Package com.hazelcast.config
Class WanReplicationRef
java.lang.Object
com.hazelcast.config.WanReplicationRef
- All Implemented Interfaces:
DataSerializable
,IdentifiedDataSerializable
,Serializable
Configuration for a WAN target replication reference. This configuration
is used on IMap and ICache configurations to refer to an actual WAN
replication configuration. This way, several maps and cache configurations
may share a single WAN replication configuration.
- See Also:
-
Constructor Summary
ConstructorDescriptionWanReplicationRef
(String name, String mergePolicyClassName, List<String> filters, boolean republishingEnabled) -
Method Summary
Modifier and TypeMethodDescriptionAdds the class name implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.boolean
int
Returns type identifier for this class.int
Returns DataSerializableFactory factory ID for this class.Returns the list of class names implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.Returns the merge policy sent to the WAN replication target to merge replicated entries with existing target entries.getName()
Returns the WAN replication reference name.int
hashCode()
boolean
Returnstrue
if incoming WAN events to this member should be republished (forwarded) to this WAN replication reference.void
Reads fields from the input streamsetFilters
(List<String> filters) Sets the list of class names implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.setMergePolicyClassName
(String mergePolicyClassName) Sets the merge policy sent to the WAN replication target to merge replicated entries with existing target entries.Sets the WAN replication reference name.setRepublishingEnabled
(boolean republishEnabled) Sets if incoming WAN events to this member should be republished (forwarded) to this WAN replication reference.toString()
void
Writes object fields to output stream
-
Constructor Details
-
WanReplicationRef
public WanReplicationRef() -
WanReplicationRef
-
WanReplicationRef
-
-
Method Details
-
getName
Returns the WAN replication reference name. -
setName
Sets the WAN replication reference name.- Parameters:
name
- the reference name- Returns:
- this config
-
getMergePolicyClassName
Returns the merge policy sent to the WAN replication target to merge replicated entries with existing target entries. The default merge policy isDEFAULT_MERGE_POLICY_CLASS_NAME
-
setMergePolicyClassName
Sets the merge policy sent to the WAN replication target to merge replicated entries with existing target entries. The default merge policy isDEFAULT_MERGE_POLICY_CLASS_NAME
- Parameters:
mergePolicyClassName
- the merge policy- Returns:
- this config
-
addFilter
Adds the class name implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.NOTE: EE only
- Parameters:
filterClassName
- the class name- Returns:
- this config
-
getFilters
Returns the list of class names implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.NOTE: EE only
- Returns:
- list of class names implementing the CacheWanEventFilter or MapWanEventFilter
-
setFilters
Sets the list of class names implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.NOTE: EE only
- Parameters:
filters
- the list of class names implementing CacheWanEventFilter or MapWanEventFilter- Returns:
- this config
-
isRepublishingEnabled
public boolean isRepublishingEnabled()Returnstrue
if incoming WAN events to this member should be republished (forwarded) to this WAN replication reference. The default state for republishing istrue
(enabled). -
setRepublishingEnabled
Sets if incoming WAN events to this member should be republished (forwarded) to this WAN replication reference. The default state for republishing istrue
(enabled).- Parameters:
republishEnabled
- whether WAN event republishing is enabled- Returns:
- this config
-
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.
-
toString
-
equals
-
hashCode
public int hashCode()
-