Class 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
    • 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()
      Returns true 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 stream
      WanReplicationRef 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
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WanReplicationRef

        public WanReplicationRef()
      • 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 is DEFAULT_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 is DEFAULT_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()
        Returns true 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
      • 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 interface DataSerializable
        Parameters:
        out - output
        Throws:
        java.io.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 java.io.IOException
        Description copied from interface: DataSerializable
        Reads fields from the input stream
        Specified by:
        readData in interface DataSerializable
        Parameters:
        in - input
        Throws:
        java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the input stream has been closed.
      • toString

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object