Package com.hazelcast.config
Class WanConsumerConfig
java.lang.Object
com.hazelcast.config.WanConsumerConfig
- All Implemented Interfaces:
DataSerializable
,IdentifiedDataSerializable
Config for processing WAN events received from a target cluster.
You can configure certain behaviour when processing incoming WAN events
or even configure your own implementation for a WAN consumer. A custom
WAN consumer allows you to define custom processing logic and is usually
used in combination with a custom WAN publisher.
A custom consumer is optional and you may simply omit defining it which
will cause the default processing logic to be used.
NOTE: EE only
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns type identifier for this class.Returns the fully qualified class name of the class implementingWanConsumer
.int
Returns DataSerializableFactory factory ID for this class.Returns the implementation implementingWanConsumer
.Returns the properties for the custom WAN consumer.int
hashCode()
boolean
void
Reads fields from the input streamsetClassName
(String className) Sets the fully qualified class name of the class implementingWanConsumer
.setImplementation
(WanConsumer implementation) Sets the implementation for this WAN consumer.setPersistWanReplicatedData
(boolean persistWanReplicatedData) setProperties
(Map<String, Comparable> properties) Sets the properties for the custom WAN consumer.toString()
void
Writes object fields to output stream
-
Field Details
-
DEFAULT_PERSIST_WAN_REPLICATED_DATA
public static final boolean DEFAULT_PERSIST_WAN_REPLICATED_DATA
-
-
Constructor Details
-
WanConsumerConfig
public WanConsumerConfig()
-
-
Method Details
-
getProperties
Returns the properties for the custom WAN consumer. -
setProperties
Sets the properties for the custom WAN consumer. These properties are accessible when initalizing the WAN consumer.- Parameters:
properties
- the properties for the WAN consumer- Returns:
- this config
-
getClassName
Returns the fully qualified class name of the class implementingWanConsumer
.- Returns:
- fully qualified class name
-
setClassName
Sets the fully qualified class name of the class implementingWanConsumer
. The class name may benull
in which case the implementation or the default processing logic for incoming WAN events will be used.- Parameters:
className
- fully qualified class name- Returns:
- this config
- See Also:
-
getImplementation
Returns the implementation implementingWanConsumer
.- Returns:
- the implementation for this WAN consumer
-
setImplementation
Sets the implementation for this WAN consumer. The object must implementWanConsumer
. The implementation may benull
in which case the class name or the default processing logic for incoming WAN events will be used.- Parameters:
implementation
- the object implementingWanConsumer
- Returns:
- this config
- See Also:
-
isPersistWanReplicatedData
public boolean isPersistWanReplicatedData()- Returns:
true
when persistence of replicated data into backing store is enabled, otherwise returnsfalse
. By default this method returns false.
-
setPersistWanReplicatedData
- Parameters:
persistWanReplicatedData
- settrue
to enable persistence of replicated data into backing store, otherwise setfalse
to disable it. Default value is false.- Returns:
- reference to this
WanReplicationRef
object
-
toString
-
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializable
Returns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryId
in interfaceIdentifiedDataSerializable
- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializable
Returns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassId
in interfaceIdentifiedDataSerializable
- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-
equals
-
hashCode
public int hashCode()
-