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:
  • Constructor Details

    • WanReplicationRef

      public WanReplicationRef()
    • WanReplicationRef

      public WanReplicationRef(WanReplicationRef ref)
    • WanReplicationRef

      public WanReplicationRef(String name, String mergePolicyClassName, List<String> filters, boolean republishingEnabled)
  • Method Details

    • getName

      public String getName()
      Returns the WAN replication reference name.
    • setName

      public WanReplicationRef setName(@Nonnull String name)
      Sets the WAN replication reference name.
      Parameters:
      name - the reference name
      Returns:
      this config
    • getMergePolicyClassName

      @Nonnull public String getMergePolicyClassName()
      Returns the merge policy sent to the WAN replication target to merge replicated entries with existing target entries. The default merge policy is DEFAULT_MERGE_POLICY_CLASS_NAME
    • setMergePolicyClassName

      public WanReplicationRef setMergePolicyClassName(@Nonnull String mergePolicyClassName)
      Sets the merge policy sent to the WAN replication target to merge replicated entries with existing target entries. The default merge policy is DEFAULT_MERGE_POLICY_CLASS_NAME
      Parameters:
      mergePolicyClassName - the merge policy
      Returns:
      this config
    • addFilter

      public WanReplicationRef addFilter(@Nonnull 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 List<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 List<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()
      Returns true if incoming WAN events to this member should be republished (forwarded) to this WAN replication reference. The default state for republishing is true (enabled).
    • setRepublishingEnabled

      public WanReplicationRef setRepublishingEnabled(boolean republishEnabled)
      Sets if incoming WAN events to this member should be republished (forwarded) to this WAN replication reference. The default state for republishing is true (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 interface IdentifiedDataSerializable
      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 interface IdentifiedDataSerializable
      Returns:
      type ID
    • writeData

      public void writeData(ObjectDataOutput out) throws IOException
      Description copied from interface: DataSerializable
      Writes object fields to output stream
      Specified by:
      writeData in interface DataSerializable
      Parameters:
      out - output
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
    • readData

      public void readData(ObjectDataInput in) throws IOException
      Description copied from interface: DataSerializable
      Reads fields from the input stream
      Specified by:
      readData in interface DataSerializable
      Parameters:
      in - input
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the input stream has been closed.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object