Record Class MultiClusterConfig

java.lang.Object
java.lang.Record
org.openspaces.core.multicluster.MultiClusterConfig
Record Components:
writeMode - how mutations are distributed
readMode - how reads pick a cluster
failoverPolicy - what happens when the routed cluster is unavailable
transactionPolicy - behaviour of fan-out inside a transaction
quiescePolicy - behaviour when a cluster is quiesced
failureThreshold - consecutive failed reads before a cluster is marked unhealthy; a failed mutation against an unreachable cluster takes it out at once
failureWindow - rolling window in which those failures must occur
requiredSuccessCount - for WRITE_SYNC, how many clusters must succeed (0 = all of them)
takeFanOutOnMiss - whether a take that matched nothing on the read cluster still issues removals elsewhere
asyncQueueCapacity - bound on mutations still owed to a cluster - deferred because it was quiesced, or handed to the background arm of an asynchronous operation
fanOutTasks - whether execute runs the task on every cluster rather than only on the active one. Off by default: a task is arbitrary code that may not be idempotent, and running it twice is a worse failure than running it once
clearSumsAcrossClusters - whether a fanned-out clear returns the total removed across clusters rather than the primary's count

public record MultiClusterConfig(MultiClusterGigaSpace.WriteMode writeMode, MultiClusterGigaSpace.ReadMode readMode, MultiClusterGigaSpace.FailoverPolicy failoverPolicy, TransactionPolicy transactionPolicy, QuiescePolicy quiescePolicy, int failureThreshold, Duration failureWindow, int requiredSuccessCount, boolean takeFanOutOnMiss, int asyncQueueCapacity, boolean fanOutTasks, boolean clearSumsAcrossClusters) extends Record
The complete routing configuration of a proxy instance, validated as a whole.

Immutable on purpose. The setXxx methods on MultiClusterGigaSpace swap one config for another atomically, so an in-flight operation always sees a coherent set of settings rather than a half-applied change. The withXxx methods produce the replacement.

MultiClusterGigaSpace.WriteMode.WRITE_ONCE is the single statement of who replicates a mutation: the proxy applies it to one cluster and a WAN Gateway carries it, or MultiClusterGigaSpace.WriteMode.WRITE_SYNC fans it out from here.