Package com.hazelcast.config
Class WanReplicationRef
java.lang.Object
com.hazelcast.config.WanReplicationRef
- All Implemented Interfaces:
DataSerializable
,IdentifiedDataSerializable
,Serializable
public class WanReplicationRef extends Object implements 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:
WanReplicationConfig
, Serialized Form
-
Constructor Summary
Constructors Constructor Description WanReplicationRef()
WanReplicationRef(WanReplicationRef ref)
WanReplicationRef(String name, String mergePolicyClassName, List<String> filters, boolean republishingEnabled)
-
Method Summary
Modifier and Type Method Description WanReplicationRef
addFilter(String filterClassName)
Adds the class name implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.boolean
equals(Object o)
int
getClassId()
Returns type identifier for this class.int
getFactoryId()
Returns DataSerializableFactory factory ID for this class.List<String>
getFilters()
Returns the list of class names implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.String
getMergePolicyClassName()
Returns the merge policy sent to the WAN replication target to merge replicated entries with existing target entries.String
getName()
Returns the WAN replication reference name.int
hashCode()
boolean
isRepublishingEnabled()
Returnstrue
if incoming WAN events to this member should be republished (forwarded) to this WAN replication reference.void
readData(ObjectDataInput in)
Reads fields from the input streamWanReplicationRef
setFilters(List<String> filters)
Sets the list of class names implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.WanReplicationRef
setMergePolicyClassName(String mergePolicyClassName)
Sets the merge policy sent to the WAN replication target to merge replicated entries with existing target entries.WanReplicationRef
setName(String name)
Sets the WAN replication reference name.WanReplicationRef
setRepublishingEnabled(boolean republishEnabled)
Sets if incoming WAN events to this member should be republished (forwarded) to this WAN replication reference.String
toString()
void
writeData(ObjectDataOutput out)
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. -
setRepublishingEnabled
Sets if incoming WAN events to this member should be republished (forwarded) to this WAN replication reference.- 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()
-