com.hazelcast.config

## Class WanReplicationRef

- java.lang.Object
- - com.hazelcast.config.WanReplicationRef

- All Implemented Interfaces:
    DataSerializable, Serializable
  Direct Known Subclasses:
    WanReplicationRefReadOnly

      public class WanReplicationRef
      extends Object
      implements DataSerializable, 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 and Description
    `WanReplicationRef()`
    `WanReplicationRef(String name, String mergePolicy, List<String> filters, boolean republishingEnabled)`
    `WanReplicationRef(WanReplicationRef ref)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `WanReplicationRef` | `addFilter(String filter)` Adds the class name implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.
    `boolean` | `equals(Object o)`
    `WanReplicationRefReadOnly` | `getAsReadOnly()` Deprecated. this method will be removed in 4.0; it is meant for internal usage only
    `List<String>` | `getFilters()` Returns the list of class names implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.
    `String` | `getMergePolicy()` 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()` 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(List<String> filters)` Sets the list of class names implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.
    `WanReplicationRef` | `setMergePolicy(String mergePolicy)` 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

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### WanReplicationRef

          public WanReplicationRef()

    - #### WanReplicationRef

          public WanReplicationRef(WanReplicationRef ref)

    - #### WanReplicationRef

          public WanReplicationRef(String name,
                                   String mergePolicy,
                                   List<String> filters,
                                   boolean republishingEnabled)

  - ### Method Detail

    - #### getAsReadOnly

          public WanReplicationRefReadOnly getAsReadOnly()

      Deprecated. this method will be removed in 4.0; it is meant for internal usage only
      Gets immutable version of this configuration.
      Returns:
        immutable version of this configuration

    - #### getName

          public String getName()

      Returns the WAN replication reference name.

    - #### setName

          public WanReplicationRef setName(String name)

      Sets the WAN replication reference name.
      Parameters:
        `name` - the reference name
      Returns:
        this config

    - #### getMergePolicy

          public String getMergePolicy()

      Returns the merge policy sent to the WAN replication target to merge replicated entries with existing target entries.

    - #### setMergePolicy

          public WanReplicationRef setMergePolicy(String mergePolicy)

      Sets the merge policy sent to the WAN replication target to merge replicated entries with existing target entries.
      Parameters:
        `mergePolicy` - the merge policy
      Returns:
        this config

    - #### addFilter

          public WanReplicationRef addFilter(String filter)

      Adds the class name implementing the CacheWanEventFilter or MapWanEventFilter for filtering outbound WAN replication events.

      NOTE: EE only

      Parameters:
        `filter` - the class name
      Returns:
        this config

    - #### getFilters

          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(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.

    - #### 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 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`

Copyright © 2020. All rights reserved.