Package com.hazelcast.config
Class WanReplicationRef
- java.lang.Object
-
- com.hazelcast.config.WanReplicationRef
-
- All Implemented Interfaces:
DataSerializable
,IdentifiedDataSerializable
,java.io.Serializable
public class WanReplicationRef extends java.lang.Object implements IdentifiedDataSerializable, java.io.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(java.lang.String name, java.lang.String mergePolicyClassName, java.util.List<java.lang.String> filters, boolean republishingEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WanReplicationRef
addFilter(java.lang.String filterClassName)
Adds the class name implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.boolean
equals(java.lang.Object o)
int
getClassId()
Returns type identifier for this class.int
getFactoryId()
Returns DataSerializableFactory factory ID for this class.java.util.List<java.lang.String>
getFilters()
Returns the list of class names implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.java.lang.String
getMergePolicyClassName()
Returns the merge policy sent to the WAN replication target to merge replicated entries with existing target entries.java.lang.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(java.util.List<java.lang.String> filters)
Sets the list of class names implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.WanReplicationRef
setMergePolicyClassName(java.lang.String mergePolicyClassName)
Sets the merge policy sent to the WAN replication target to merge replicated entries with existing target entries.WanReplicationRef
setName(java.lang.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.java.lang.String
toString()
void
writeData(ObjectDataOutput out)
Writes object fields to output stream
-
-
-
Constructor Detail
-
WanReplicationRef
public WanReplicationRef()
-
WanReplicationRef
public WanReplicationRef(WanReplicationRef ref)
-
WanReplicationRef
public WanReplicationRef(java.lang.String name, java.lang.String mergePolicyClassName, java.util.List<java.lang.String> filters, boolean republishingEnabled)
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the WAN replication reference name.
-
setName
public WanReplicationRef setName(@Nonnull java.lang.String name)
Sets the WAN replication reference name.- Parameters:
name
- the reference name- Returns:
- this config
-
getMergePolicyClassName
@Nonnull public java.lang.String 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
public WanReplicationRef setMergePolicyClassName(@Nonnull java.lang.String mergePolicyClassName)
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
public WanReplicationRef addFilter(@Nonnull java.lang.String filterClassName)
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
@Nonnull public java.util.List<java.lang.String> 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
public WanReplicationRef setFilters(@Nonnull java.util.List<java.lang.String> filters)
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
public WanReplicationRef setRepublishingEnabled(boolean republishEnabled)
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
public void writeData(ObjectDataOutput out) throws java.io.IOException
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
java.io.IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
public void readData(ObjectDataInput in) throws java.io.IOException
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
java.io.IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-