com.hazelcast.config

## Class WanPublisherConfig

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

- All Implemented Interfaces:
    DataSerializable, IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned

      public class WanPublisherConfig
      extends Object
      implements IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned

  Configuration object for a WAN publisher. A single publisher defines how WAN events are sent to a specific endpoint. The endpoint can be a different cluster defined by static IP's or discovered using a cloud discovery mechanism. When using a custom WAN publisher implementation, the target may also be some other external system which is not a Hazelcast cluster.
  See Also:
    `DiscoveryConfig`, `AwsConfig`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WanPublisherConfig()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `AwsConfig` | `getAwsConfig()` Returns the `AwsConfig` used by the discovery mechanism for this WAN publisher.
    `AzureConfig` | `getAzureConfig()` Returns the `AzureConfig` used by the discovery mechanism for this WAN publisher.
    `String` | `getClassName()` Returns the name of the class implementing the WanReplicationEndpoint.
    `DiscoveryConfig` | `getDiscoveryConfig()` Returns the currently defined `DiscoveryConfig` used by the discovery mechanism for this WAN publisher.
    `String` | `getEndpoint()`
    `EurekaConfig` | `getEurekaConfig()` Returns the `EurekaConfig` used by the discovery mechanism for this WAN publisher.
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `GcpConfig` | `getGcpConfig()` Returns the `GcpConfig` used by the discovery mechanism for this WAN publisher.
    `String` | `getGroupName()` Returns the group name used as an endpoint group name for authentication on the target endpoint.
    `int` | `getId()` Returns type identifier for this class.
    `Object` | `getImplementation()` Returns the implementation of the WanReplicationEndpoint.
    `WanPublisherState` | `getInitialPublisherState()` Returns the initial WAN publisher state.
    `KubernetesConfig` | `getKubernetesConfig()` Returns the `KubernetesConfig` used by the discovery mechanism for this WAN publisher.
    `Map<String,Comparable>` | `getProperties()` Returns the WAN publisher properties.
    `String` | `getPublisherId()` Returns the publisher ID used for identifying the publisher in a `WanReplicationConfig`.
    `int` | `getQueueCapacity()` Returns the capacity of the primary and backup queue for WAN replication events.
    `WANQueueFullBehavior` | `getQueueFullBehavior()` Returns the configured behaviour of this WAN publisher when the WAN queue is full.
    `WanSyncConfig` | `getWanSyncConfig()` Returns the config for the WAN sync mechanism.
    `int` | `hashCode()`
    `void` | `readData(ObjectDataInput in)` Reads fields from the input stream
    `WanPublisherConfig` | `setAwsConfig(AwsConfig awsConfig)` Sets the `AwsConfig` used by the discovery mechanism for this WAN publisher.
    `WanPublisherConfig` | `setAzureConfig(AzureConfig azureConfig)` Sets the `AzureConfig` used by the discovery mechanism for this WAN publisher.
    `WanPublisherConfig` | `setClassName(String className)` Sets the name of the class implementing the WanReplicationEndpoint.
    `WanPublisherConfig` | `setDiscoveryConfig(DiscoveryConfig discoveryConfig)` Sets the `DiscoveryConfig` used by the discovery mechanism for this WAN publisher.
    `WanPublisherConfig` | `setEndpoint(String endpoint)`
    `WanPublisherConfig` | `setEurekaConfig(EurekaConfig eurekaConfig)` Sets the `EurekaConfig` used by the discovery mechanism for this WAN publisher.
    `WanPublisherConfig` | `setGcpConfig(GcpConfig gcpConfig)` Sets the `GcpConfig` used by the discovery mechanism for this WAN publisher.
    `WanPublisherConfig` | `setGroupName(String groupName)` Sets the group name used as an endpoint group name for authentication on the target endpoint.
    `WanPublisherConfig` | `setImplementation(Object implementation)` Sets the implementation of the WanReplicationEndpoint.
    `WanPublisherConfig` | `setInitialPublisherState(WanPublisherState initialPublisherState)` Sets the initial publisher state.
    `WanPublisherConfig` | `setKubernetesConfig(KubernetesConfig kubernetesConfig)` Sets the `KubernetesConfig` used by the discovery mechanism for this WAN publisher.
    `WanPublisherConfig` | `setProperties(Map<String,Comparable> properties)` Sets the WAN publisher properties.
    `WanPublisherConfig` | `setPublisherId(String publisherId)` Sets the publisher ID used for identifying the publisher in a `WanReplicationConfig`.
    `WanPublisherConfig` | `setQueueCapacity(int queueCapacity)` Sets the capacity of the primary and backup queue for WAN replication events.
    `WanPublisherConfig` | `setQueueFullBehavior(WANQueueFullBehavior queueFullBehavior)` Sets the configured behaviour of this WAN publisher when the WAN queue is full.
    `WanPublisherConfig` | `setWanSyncConfig(WanSyncConfig wanSyncConfig)` Sets the config for the WAN sync mechanism.
    `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

    - #### WanPublisherConfig

          public WanPublisherConfig()

  - ### Method Detail

    - #### getWanSyncConfig

          public WanSyncConfig getWanSyncConfig()

      Returns the config for the WAN sync mechanism.

    - #### setWanSyncConfig

          public WanPublisherConfig setWanSyncConfig(WanSyncConfig wanSyncConfig)

      Sets the config for the WAN sync mechanism.
      Parameters:
        `wanSyncConfig` - the WAN sync config
      Returns:
        this config

    - #### getGroupName

          public String getGroupName()

      Returns the group name used as an endpoint group name for authentication on the target endpoint. If there is no separate publisher ID property defined, this group name will also be used as a WAN publisher ID. This ID is then used for identifying the publisher in a `WanReplicationConfig`.
      Returns:
        the WAN endpoint group name
      See Also:
        `getPublisherId()`

    - #### setGroupName

          public WanPublisherConfig setGroupName(String groupName)

      Sets the group name used as an endpoint group name for authentication on the target endpoint. If there is no separate publisher ID property defined, this group name will also be used as a WAN publisher ID. This ID is then used for identifying the publisher in a `WanReplicationConfig`.
      Parameters:
        `groupName` - the WAN endpoint group name
      Returns:
        this config
      See Also:
        `getPublisherId()`

    - #### getPublisherId

          public String getPublisherId()

      Returns the publisher ID used for identifying the publisher in a `WanReplicationConfig`. If there is no publisher ID defined (it is empty), the group name will be used as a publisher ID.
      Returns:
        the WAN publisher ID or `null` if no publisher ID is set
      See Also:
        `getGroupName()`

    - #### setPublisherId

          public WanPublisherConfig setPublisherId(String publisherId)

      Sets the publisher ID used for identifying the publisher in a `WanReplicationConfig`. If there is no publisher ID defined (it is empty), the group name will be used as a publisher ID.
      Parameters:
        `publisherId` - the WAN publisher ID
      Returns:
        this config
      See Also:
        `getGroupName()`

    - #### getQueueCapacity

          public int getQueueCapacity()

      Returns the capacity of the primary and backup queue for WAN replication events.

      One hazelcast instance can have up to `2*queueCapacity` events since we keep up to `queueCapacity` primary events (events with keys for which the instance is the owner) and `queueCapacity` backup events (events with keys for which the instance is the backup). Events for IMap and ICache count against this limit collectively.

      When the queue capacity is reached, backup events are dropped while normal replication events behave as determined by the `getQueueFullBehavior()`. The default queue size for replication queues is .

      Returns:
        the queue capacity

    - #### setQueueCapacity

          public WanPublisherConfig setQueueCapacity(int queueCapacity)

      Sets the capacity of the primary and backup queue for WAN replication events.

      One hazelcast instance can have up to `2*queueCapacity` events since we keep up to `queueCapacity` primary events (events with keys for which the instance is the owner) and `queueCapacity` backup events (events with keys for which the instance is the backup). Events for IMap and ICache count against this limit collectively.

      When the queue capacity is reached, backup events are dropped while normal replication events behave as determined by the `getQueueFullBehavior()`. The default queue size for replication queues is .

      Parameters:
        `queueCapacity` - the queue capacity
      Returns:
        this config

    - #### getQueueFullBehavior

          public WANQueueFullBehavior getQueueFullBehavior()

      Returns the configured behaviour of this WAN publisher when the WAN queue is full.

    - #### setQueueFullBehavior

          public WanPublisherConfig setQueueFullBehavior(WANQueueFullBehavior queueFullBehavior)

      Sets the configured behaviour of this WAN publisher when the WAN queue is full.
      Parameters:
        `queueFullBehavior` - the behaviour of this publisher when the WAN queue is full
      Returns:
        this config

    - #### getInitialPublisherState

          public WanPublisherState getInitialPublisherState()

      Returns the initial WAN publisher state.

    - #### setInitialPublisherState

          public WanPublisherConfig setInitialPublisherState(WanPublisherState initialPublisherState)

      Sets the initial publisher state.
      Parameters:
        `initialPublisherState` - the state
      Returns:
        this configuration

    - #### getProperties

          public Map<String,Comparable> getProperties()

      Returns the WAN publisher properties.

    - #### setProperties

          public WanPublisherConfig setProperties(Map<String,Comparable> properties)

      Sets the WAN publisher properties.
      Parameters:
        `properties` - WAN publisher properties
      Returns:
        this config

    - #### getClassName

          public String getClassName()

      Returns the name of the class implementing the WanReplicationEndpoint. NOTE: OS and EE have different interfaces that this class should implement. For OS see `WanReplicationEndpoint`.

    - #### setClassName

          public WanPublisherConfig setClassName(String className)

      Sets the name of the class implementing the WanReplicationEndpoint. NOTE: OS and EE have different interfaces that this class should implement. For OS see `WanReplicationEndpoint`.
      Parameters:
        `className` - the name of the class implementation for the WAN replication
      Returns:
        this config

    - #### getImplementation

          public Object getImplementation()

      Returns the implementation of the WanReplicationEndpoint. NOTE: OS and EE have different interfaces that this object should implement. For OS see `WanReplicationEndpoint`.

    - #### setImplementation

          public WanPublisherConfig setImplementation(Object implementation)

      Sets the implementation of the WanReplicationEndpoint. NOTE: OS and EE have different interfaces that this object should implement. For OS see `WanReplicationEndpoint`.
      Parameters:
        `implementation` - the implementation for the WAN replication
      Returns:
        this config

    - #### getAwsConfig

          public AwsConfig getAwsConfig()

      Returns the `AwsConfig` used by the discovery mechanism for this WAN publisher.

    - #### setAwsConfig

          public WanPublisherConfig setAwsConfig(AwsConfig awsConfig)

      Sets the `AwsConfig` used by the discovery mechanism for this WAN publisher.
      Parameters:
        `awsConfig` - the AWS discovery configuration
      Returns:
        this config
      Throws:
        `IllegalArgumentException` - if awsConfig is null

    - #### getGcpConfig

          public GcpConfig getGcpConfig()

      Returns the `GcpConfig` used by the discovery mechanism for this WAN publisher.

    - #### setGcpConfig

          public WanPublisherConfig setGcpConfig(GcpConfig gcpConfig)

      Sets the `GcpConfig` used by the discovery mechanism for this WAN publisher.
      Parameters:
        `gcpConfig` - the GCP discovery configuration
      Returns:
        this config
      Throws:
        `IllegalArgumentException` - if gcpConfig is null

    - #### getAzureConfig

          public AzureConfig getAzureConfig()

      Returns the `AzureConfig` used by the discovery mechanism for this WAN publisher.

    - #### setAzureConfig

          public WanPublisherConfig setAzureConfig(AzureConfig azureConfig)

      Sets the `AzureConfig` used by the discovery mechanism for this WAN publisher.
      Parameters:
        `azureConfig` - the Azure discovery configuration
      Returns:
        this config
      Throws:
        `IllegalArgumentException` - if azureConfig is null

    - #### getKubernetesConfig

          public KubernetesConfig getKubernetesConfig()

      Returns the `KubernetesConfig` used by the discovery mechanism for this WAN publisher.

    - #### setKubernetesConfig

          public WanPublisherConfig setKubernetesConfig(KubernetesConfig kubernetesConfig)

      Sets the `KubernetesConfig` used by the discovery mechanism for this WAN publisher.
      Parameters:
        `kubernetesConfig` - the Kubernetes discovery configuration
      Returns:
        this config
      Throws:
        `IllegalArgumentException` - if kubernetesConfig is null

    - #### getEurekaConfig

          public EurekaConfig getEurekaConfig()

      Returns the `EurekaConfig` used by the discovery mechanism for this WAN publisher.

    - #### setEurekaConfig

          public WanPublisherConfig setEurekaConfig(EurekaConfig eurekaConfig)

      Sets the `EurekaConfig` used by the discovery mechanism for this WAN publisher.
      Parameters:
        `eurekaConfig` - the Eureka discovery configuration
      Returns:
        this config
      Throws:
        `IllegalArgumentException` - if eurekaConfig is null

    - #### getDiscoveryConfig

          public DiscoveryConfig getDiscoveryConfig()

      Returns the currently defined `DiscoveryConfig` used by the discovery mechanism for this WAN publisher.
      Returns:
        current DiscoveryProvidersConfig instance

    - #### setDiscoveryConfig

          public WanPublisherConfig setDiscoveryConfig(DiscoveryConfig discoveryConfig)

      Sets the `DiscoveryConfig` used by the discovery mechanism for this WAN publisher.
      Parameters:
        `discoveryConfig` - configuration to set
      Returns:
        this config
      Throws:
        `IllegalArgumentException` - if discoveryProvidersConfig is null

    - #### getEndpoint

          public String getEndpoint()

    - #### setEndpoint

          public WanPublisherConfig setEndpoint(String endpoint)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
        `getId` 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.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2019. All rights reserved.