Class HazelcastWANReplicationTargetClusterProperties

java.lang.Object
org.apereo.cas.configuration.model.support.hazelcast.HazelcastWANReplicationTargetClusterProperties
All Implemented Interfaces:
Serializable

@RequiresModule(name="cas-server-support-hazelcast-core") public class HazelcastWANReplicationTargetClusterProperties extends Object implements Serializable
Since:
6.1.0
See Also:
  • Constructor Details

    • HazelcastWANReplicationTargetClusterProperties

      public HazelcastWANReplicationTargetClusterProperties()
  • Method Details

    • getEndpoints

      public String getEndpoints()
      Comma separated list of endpoints in this replication group. IP addresses and ports of the cluster members for which the WAN replication is implemented. These endpoints are not necessarily the entire target cluster and WAN does not perform the discovery of other members in the target cluster. It only expects that these IP addresses (or at least some of them) are available.
    • getClusterName

      public String getClusterName()
      Sets the cluster name used as an endpoint group password for authentication on the target endpoint. If there is no separate publisher ID property defined, this cluster name will also be used as a WAN publisher ID. This ID is then used for identifying the publisher.
    • getPublisherId

      public String getPublisherId()
      Returns the publisher ID used for identifying the publisher.
    • getProperties

      public Map<String,Comparable> getProperties()
      The WAN publisher properties.
    • getConsistencyCheckStrategy

      public String getConsistencyCheckStrategy()
      Strategy for checking the consistency of data between replicas.
    • getPublisherClassName

      public String getPublisherClassName()
      Publisher class name for WAN replication.
    • getQueueFullBehavior

      public String getQueueFullBehavior()
      Accepted values are:
      • THROW_EXCEPTION: Instruct WAN replication implementation to throw an exception and doesn't allow further processing.
      • DISCARD_AFTER_MUTATION: Instruct WAN replication implementation to drop new events when WAN event queues are full.
      • THROW_EXCEPTION_ONLY_IF_REPLICATION_ACTIVE: Similar to THROW_EXCEPTION but only throws exception when WAN replication is active. * Discards the new events if WAN replication is stopped.
    • getAcknowledgeType

      public String getAcknowledgeType()
      Accepted values are:
      • ACK_ON_RECEIPT: ACK after WAN operation is received by the target cluster (without waiting the result of actual operation invocation).
      • ACK_ON_OPERATION_COMPLETE: Wait till the operation is complete on target cluster.
    • getQueueCapacity

      public int getQueueCapacity()
      For huge clusters or high data mutation rates, you might need to increase the replication queue size. The default queue size for replication queues is 10,000. This means, if you have heavy put/update/remove rates, you might exceed the queue size so that the oldest, not yet replicated, updates might get lost.
    • getBatchSize

      public int getBatchSize()
      Maximum size of events that are sent to the target cluster in a single batch.
    • isSnapshotEnabled

      public boolean isSnapshotEnabled()
      When set to true, only the latest events (based on key) are selected and sent in a batch.
    • getBatchMaximumDelayMilliseconds

      public int getBatchMaximumDelayMilliseconds()
      Maximum amount of time, in milliseconds, to be waited before sending a batch of events in case batch.size is not reached.
    • getResponseTimeoutMilliseconds

      public int getResponseTimeoutMilliseconds()
      Time, in milliseconds, to be waited for the acknowledgment of a sent WAN event to target cluster.
    • getExecutorThreadCount

      public int getExecutorThreadCount()
      The number of threads that the replication executor will have. The executor is used to send WAN events to the endpoints and ideally you want to have one thread per endpoint. If this property is omitted and you have specified the endpoints property, this will be the case. If necessary you can manually define the number of threads that the executor will use. Once the executor has been initialized there is thread affinity between the discovered endpoints and the executor threads - all events for a single endpoint will go through a single executor thread, preserving event order. It is important to determine which number of executor threads is a good value. Failure to do so can lead to performance issues - either contention on a too small number of threads or wasted threads that will not be performing any work.
    • setEndpoints

      public HazelcastWANReplicationTargetClusterProperties setEndpoints(String endpoints)
      Comma separated list of endpoints in this replication group. IP addresses and ports of the cluster members for which the WAN replication is implemented. These endpoints are not necessarily the entire target cluster and WAN does not perform the discovery of other members in the target cluster. It only expects that these IP addresses (or at least some of them) are available.
      Returns:
      this.
    • setClusterName

      public HazelcastWANReplicationTargetClusterProperties setClusterName(String clusterName)
      Sets the cluster name used as an endpoint group password for authentication on the target endpoint. If there is no separate publisher ID property defined, this cluster name will also be used as a WAN publisher ID. This ID is then used for identifying the publisher.
      Returns:
      this.
    • setPublisherId

      public HazelcastWANReplicationTargetClusterProperties setPublisherId(String publisherId)
      Returns the publisher ID used for identifying the publisher.
      Returns:
      this.
    • setProperties

      The WAN publisher properties.
      Returns:
      this.
    • setConsistencyCheckStrategy

      public HazelcastWANReplicationTargetClusterProperties setConsistencyCheckStrategy(String consistencyCheckStrategy)
      Strategy for checking the consistency of data between replicas.
      Returns:
      this.
    • setPublisherClassName

      public HazelcastWANReplicationTargetClusterProperties setPublisherClassName(String publisherClassName)
      Publisher class name for WAN replication.
      Returns:
      this.
    • setQueueFullBehavior

      public HazelcastWANReplicationTargetClusterProperties setQueueFullBehavior(String queueFullBehavior)
      Accepted values are:
      • THROW_EXCEPTION: Instruct WAN replication implementation to throw an exception and doesn't allow further processing.
      • DISCARD_AFTER_MUTATION: Instruct WAN replication implementation to drop new events when WAN event queues are full.
      • THROW_EXCEPTION_ONLY_IF_REPLICATION_ACTIVE: Similar to THROW_EXCEPTION but only throws exception when WAN replication is active. * Discards the new events if WAN replication is stopped.
      Returns:
      this.
    • setAcknowledgeType

      public HazelcastWANReplicationTargetClusterProperties setAcknowledgeType(String acknowledgeType)
      Accepted values are:
      • ACK_ON_RECEIPT: ACK after WAN operation is received by the target cluster (without waiting the result of actual operation invocation).
      • ACK_ON_OPERATION_COMPLETE: Wait till the operation is complete on target cluster.
      Returns:
      this.
    • setQueueCapacity

      public HazelcastWANReplicationTargetClusterProperties setQueueCapacity(int queueCapacity)
      For huge clusters or high data mutation rates, you might need to increase the replication queue size. The default queue size for replication queues is 10,000. This means, if you have heavy put/update/remove rates, you might exceed the queue size so that the oldest, not yet replicated, updates might get lost.
      Returns:
      this.
    • setBatchSize

      public HazelcastWANReplicationTargetClusterProperties setBatchSize(int batchSize)
      Maximum size of events that are sent to the target cluster in a single batch.
      Returns:
      this.
    • setSnapshotEnabled

      public HazelcastWANReplicationTargetClusterProperties setSnapshotEnabled(boolean snapshotEnabled)
      When set to true, only the latest events (based on key) are selected and sent in a batch.
      Returns:
      this.
    • setBatchMaximumDelayMilliseconds

      public HazelcastWANReplicationTargetClusterProperties setBatchMaximumDelayMilliseconds(int batchMaximumDelayMilliseconds)
      Maximum amount of time, in milliseconds, to be waited before sending a batch of events in case batch.size is not reached.
      Returns:
      this.
    • setResponseTimeoutMilliseconds

      public HazelcastWANReplicationTargetClusterProperties setResponseTimeoutMilliseconds(int responseTimeoutMilliseconds)
      Time, in milliseconds, to be waited for the acknowledgment of a sent WAN event to target cluster.
      Returns:
      this.
    • setExecutorThreadCount

      public HazelcastWANReplicationTargetClusterProperties setExecutorThreadCount(int executorThreadCount)
      The number of threads that the replication executor will have. The executor is used to send WAN events to the endpoints and ideally you want to have one thread per endpoint. If this property is omitted and you have specified the endpoints property, this will be the case. If necessary you can manually define the number of threads that the executor will use. Once the executor has been initialized there is thread affinity between the discovered endpoints and the executor threads - all events for a single endpoint will go through a single executor thread, preserving event order. It is important to determine which number of executor threads is a good value. Failure to do so can lead to performance issues - either contention on a too small number of threads or wasted threads that will not be performing any work.
      Returns:
      this.