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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionAccepted 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.int
Maximum amount of time, in milliseconds, to be waited before sending a batch of events in case batch.size is not reached.int
Maximum size of events that are sent to the target cluster in a single batch.Sets the cluster name used as an endpoint group password for authentication on the target endpoint.Strategy for checking the consistency of data between replicas.Comma separated list of endpoints in this replication group.int
The number of threads that the replication executor will have.The WAN publisher properties.Publisher class name for WAN replication.Returns the publisher ID used for identifying the publisher.int
For huge clusters or high data mutation rates, you might need to increase the replication queue size.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 toTHROW_EXCEPTION
but only throws exception when WAN replication is active.int
Time, in milliseconds, to be waited for the acknowledgment of a sent WAN event to target cluster.boolean
When set to true, only the latest events (based on key) are selected and sent in a batch.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.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.setBatchSize
(int batchSize) Maximum size of events that are sent to the target cluster in a single batch.setClusterName
(String clusterName) Sets the cluster name used as an endpoint group password for authentication on the target endpoint.setConsistencyCheckStrategy
(String consistencyCheckStrategy) Strategy for checking the consistency of data between replicas.setEndpoints
(String endpoints) Comma separated list of endpoints in this replication group.setExecutorThreadCount
(int executorThreadCount) The number of threads that the replication executor will have.setProperties
(Map<String, Comparable> properties) The WAN publisher properties.setPublisherClassName
(String publisherClassName) Publisher class name for WAN replication.setPublisherId
(String publisherId) Returns the publisher ID used for identifying the publisher.setQueueCapacity
(int queueCapacity) For huge clusters or high data mutation rates, you might need to increase the replication queue size.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 toTHROW_EXCEPTION
but only throws exception when WAN replication is active.setResponseTimeoutMilliseconds
(int responseTimeoutMilliseconds) Time, in milliseconds, to be waited for the acknowledgment of a sent WAN event to target cluster.setSnapshotEnabled
(boolean snapshotEnabled) When set to true, only the latest events (based on key) are selected and sent in a batch.
-
Constructor Details
-
HazelcastWANReplicationTargetClusterProperties
public HazelcastWANReplicationTargetClusterProperties()
-
-
Method Details
-
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
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
Returns the publisher ID used for identifying the publisher. -
getProperties
The WAN publisher properties. -
getConsistencyCheckStrategy
Strategy for checking the consistency of data between replicas. -
getPublisherClassName
Publisher class name for WAN replication. -
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 toTHROW_EXCEPTION
but only throws exception when WAN replication is active. * Discards the new events if WAN replication is stopped.
-
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
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
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
Returns the publisher ID used for identifying the publisher.- Returns:
this
.
-
setProperties
public HazelcastWANReplicationTargetClusterProperties setProperties(Map<String, Comparable> properties) 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 toTHROW_EXCEPTION
but only throws exception when WAN replication is active. * Discards the new events if WAN replication is stopped.
- Returns:
this
.
-
setAcknowledgeType
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
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
Maximum size of events that are sent to the target cluster in a single batch.- Returns:
this
.
-
setSnapshotEnabled
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
.
-