Class ClusterConfig

java.lang.Object
com.loomcache.common.config.ClusterConfig

public final class ClusterConfig extends Object
  • Field Details

    • DEFAULT_CLUSTER_NAME

      public static final String DEFAULT_CLUSTER_NAME
      See Also:
    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      See Also:
    • DEFAULT_HEARTBEAT_INTERVAL_MS

      public static final long DEFAULT_HEARTBEAT_INTERVAL_MS
      See Also:
    • DEFAULT_HEARTBEAT_TIMEOUT_MS

      public static final long DEFAULT_HEARTBEAT_TIMEOUT_MS
      See Also:
    • DEFAULT_SNAPSHOT_THRESHOLD

      public static final int DEFAULT_SNAPSHOT_THRESHOLD
      See Also:
    • DEFAULT_MAX_PARALLEL_MIGRATIONS

      public static final int DEFAULT_MAX_PARALLEL_MIGRATIONS
      See Also:
    • DEFAULT_MAX_EXECUTOR_TASK_PAYLOAD_BYTES

      public static final int DEFAULT_MAX_EXECUTOR_TASK_PAYLOAD_BYTES
      See Also:
    • DEFAULT_MAX_CONNECTIONS

      public static final int DEFAULT_MAX_CONNECTIONS
      See Also:
    • DEFAULT_TCP_READ_TIMEOUT_MS

      public static final int DEFAULT_TCP_READ_TIMEOUT_MS
      See Also:
    • DEFAULT_TCP_IDLE_TIMEOUT_MS

      public static final long DEFAULT_TCP_IDLE_TIMEOUT_MS
      See Also:
    • DEFAULT_TCP_WRITE_QUEUE_CAPACITY

      public static final int DEFAULT_TCP_WRITE_QUEUE_CAPACITY
      See Also:
    • DEFAULT_GRACEFUL_SHUTDOWN_DRAIN_MS

      public static final long DEFAULT_GRACEFUL_SHUTDOWN_DRAIN_MS
      See Also:
    • DEFAULT_PIPELINED_EXECUTION

      public static final boolean DEFAULT_PIPELINED_EXECUTION
      See Also:
    • DEFAULT_COMMAND_QUEUE_CAPACITY

      public static final int DEFAULT_COMMAND_QUEUE_CAPACITY
      See Also:
    • DEFAULT_COMMAND_EXECUTOR_THREADS

      public static final int DEFAULT_COMMAND_EXECUTOR_THREADS
      See Also:
    • DEFAULT_AUTH_MAX_SESSIONS

      public static final int DEFAULT_AUTH_MAX_SESSIONS
      See Also:
    • DEFAULT_QUERY_MAX_AGGREGATE_SCAN_ENTRIES

      public static final int DEFAULT_QUERY_MAX_AGGREGATE_SCAN_ENTRIES
      See Also:
    • DEFAULT_QUERY_MAX_SQL_LENGTH

      public static final int DEFAULT_QUERY_MAX_SQL_LENGTH
      See Also:
    • DEFAULT_QUERY_MAX_REGEX_INPUT_LENGTH

      public static final int DEFAULT_QUERY_MAX_REGEX_INPUT_LENGTH
      See Also:
    • DEFAULT_QUERY_SLOW_QUERY_THRESHOLD_MS

      public static final long DEFAULT_QUERY_SLOW_QUERY_THRESHOLD_MS
      See Also:
    • DEFAULT_QUERY_TIMEOUT_MS

      public static final long DEFAULT_QUERY_TIMEOUT_MS
      See Also:
    • DEFAULT_BATCH_RAFT_SUBMIT_TIMEOUT_MS

      public static final long DEFAULT_BATCH_RAFT_SUBMIT_TIMEOUT_MS
      See Also:
    • DEFAULT_BATCH_REPLAY_CACHE_ENTRIES

      public static final int DEFAULT_BATCH_REPLAY_CACHE_ENTRIES
      See Also:
    • DEFAULT_DATA_WRITE_REPLAY_CACHE_ENTRIES

      public static final int DEFAULT_DATA_WRITE_REPLAY_CACHE_ENTRIES
      See Also:
    • DEFAULT_TRANSACTION_MAX_BUFFERED_OPS

      public static final int DEFAULT_TRANSACTION_MAX_BUFFERED_OPS
      See Also:
    • DEFAULT_TRANSACTION_MAX_PARTICIPANT_GROUP_COUNT

      public static final int DEFAULT_TRANSACTION_MAX_PARTICIPANT_GROUP_COUNT
      See Also:
    • DEFAULT_TRANSACTION_MAX_OPERATION_PAYLOAD_BYTES

      public static final int DEFAULT_TRANSACTION_MAX_OPERATION_PAYLOAD_BYTES
      See Also:
    • DEFAULT_TRANSACTION_COMMIT_APPLY_RETRY_DELAY_MS

      public static final long DEFAULT_TRANSACTION_COMMIT_APPLY_RETRY_DELAY_MS
      See Also:
    • DEFAULT_TRANSACTION_COMMIT_APPLY_MAX_ATTEMPTS

      public static final int DEFAULT_TRANSACTION_COMMIT_APPLY_MAX_ATTEMPTS
      See Also:
    • DEFAULT_TCP_ACCEPT_TIMEOUT_MS

      public static final int DEFAULT_TCP_ACCEPT_TIMEOUT_MS
      See Also:
    • DEFAULT_TCP_ACCEPT_BACKOFF_MAX_MS

      public static final long DEFAULT_TCP_ACCEPT_BACKOFF_MAX_MS
      See Also:
    • DEFAULT_IDEMPOTENCY_TTL_MS

      public static final long DEFAULT_IDEMPOTENCY_TTL_MS
      See Also:
    • MIN_ID_GENERATOR_NODE_ID

      public static final int MIN_ID_GENERATOR_NODE_ID
      See Also:
    • MAX_ID_GENERATOR_NODE_ID

      public static final int MAX_ID_GENERATOR_NODE_ID
      See Also:
    • DEFAULT_PARTITION_GROUP_TYPE

      public static final PartitionGroupType DEFAULT_PARTITION_GROUP_TYPE
    • DEFAULT_SHUTDOWN_MAX_WAIT_SECONDS

      public static final long DEFAULT_SHUTDOWN_MAX_WAIT_SECONDS
      See Also:
    • DEFAULT_ADMIN_ENABLED

      public static final boolean DEFAULT_ADMIN_ENABLED
      See Also:
    • DEFAULT_ADMIN_PORT

      public static final int DEFAULT_ADMIN_PORT
      See Also:
    • DEFAULT_SHUTDOWN_HOOK_ENABLED

      public static final boolean DEFAULT_SHUTDOWN_HOOK_ENABLED
      See Also:
    • DEFAULT_SHUTDOWN_HOOK_POLICY

      public static final ClusterConfig.ShutdownHookPolicy DEFAULT_SHUTDOWN_HOOK_POLICY
    • DEFAULT_HEALTH_TLS_ENABLED

      public static final boolean DEFAULT_HEALTH_TLS_ENABLED
      See Also:
    • DEFAULT_HEALTH_TLS_PORT

      public static final int DEFAULT_HEALTH_TLS_PORT
      See Also:
    • DEFAULT_HEALTH_TLS_PLAIN_TEXT_DISABLED

      public static final boolean DEFAULT_HEALTH_TLS_PLAIN_TEXT_DISABLED
      See Also:
    • DEFAULT_NODE_ID

      public static final String DEFAULT_NODE_ID
      See Also:
    • DEFAULT_HOST

      public static final String DEFAULT_HOST
      See Also:
  • Method Details

    • builder

      public static ClusterConfig.Builder builder()
    • defaultIdGeneratorNodeId

      public static int defaultIdGeneratorNodeId(String nodeId)
      Derives a cluster-unique-by-default Snowflake ID-generator node id from the cluster-unique nodeId string. This is the production default used when loomcache.id-generator.node-id is not set explicitly (see effectiveIdGeneratorNodeId). Distinct node ids map to distinct generator ids with only residual hash-collision probability (birthday-bounded over the 1023+1 buckets); the cluster-join admission check (CacheNode.handleJoin) rejects any residual collision fail-closed, so a collision degrades to a refused join rather than a duplicate-ID safety violation. This replaces the legacy defaultIdGeneratorNodeId(int) instance-number default, which produced the SAME id (1) on every node and could therefore reissue colliding ids across a leader failover under wall-clock skew.
    • defaultIdGeneratorNodeId

      public static int defaultIdGeneratorNodeId(int instanceNumber)
      Legacy instance-number-derived default. Retained only for non-production convenience construction paths and their tests, where no cluster-unique nodeId string is available. NOT cluster-unique (instanceNumber defaults to 1 on every node); production resolution uses defaultIdGeneratorNodeId(String) instead.
    • validateIdGeneratorNodeId

      public static void validateIdGeneratorNodeId(int nodeId)
    • parseRaftBootstrapServer

      public static ClusterConfig.RaftBootstrapServer parseRaftBootstrapServer(String raw)
    • parseRaftBootstrapServers

      public static List<ClusterConfig.RaftBootstrapServer> parseRaftBootstrapServers(List<String> entries)
    • clusterId

      public String clusterId()
    • clusterIdExplicit

      public boolean clusterIdExplicit()
    • nodeId

      public String nodeId()
    • nodeIdExplicit

      public boolean nodeIdExplicit()
    • host

      public String host()
    • hostExplicit

      public boolean hostExplicit()
    • bindAddress

      public String bindAddress()
    • port

      public int port()
    • instanceNumber

      public int instanceNumber()
    • idGeneratorNodeId

      public int idGeneratorNodeId()
    • idGeneratorNodeIdExplicit

      public boolean idGeneratorNodeIdExplicit()
    • seeds

      public List<String> seeds()
    • raftBootstrapServers

      public List<ClusterConfig.RaftBootstrapServer> raftBootstrapServers()
    • staticRaftBootstrapFingerprint

      public Optional<String> staticRaftBootstrapFingerprint()
    • discoveryConfig

      public DiscoveryConfig discoveryConfig()
    • heartbeatIntervalMs

      public long heartbeatIntervalMs()
    • heartbeatTimeoutMs

      public long heartbeatTimeoutMs()
    • icmpFailureDetectorConfig

      public IcmpFailureDetectorConfig icmpFailureDetectorConfig()
    • slowOperationDetectorConfig

      public SlowOperationDetectorConfig slowOperationDetectorConfig()
    • maxMemoryBytes

      public long maxMemoryBytes()
    • mapMaxEntries

      public int mapMaxEntries()
    • mapEvictionPolicy

      public String mapEvictionPolicy()
    • tlsConfig

      public TlsConfig tlsConfig()
    • endpointTlsConfig

      public EndpointTlsConfig endpointTlsConfig()
    • authConfig

      public AuthConfig authConfig()
    • authMaxSessions

      public int authMaxSessions()
    • queryMaxAggregateScanEntries

      public int queryMaxAggregateScanEntries()
    • queryMaxSqlLength

      public int queryMaxSqlLength()
    • queryMaxRegexInputLength

      public int queryMaxRegexInputLength()
    • querySlowQueryThresholdMs

      public long querySlowQueryThresholdMs()
    • queryTimeoutMs

      public long queryTimeoutMs()
    • batchRaftSubmitTimeoutMs

      public long batchRaftSubmitTimeoutMs()
    • batchReplayCacheEntries

      public int batchReplayCacheEntries()
    • dataWriteReplayCacheEntries

      public int dataWriteReplayCacheEntries()
    • transactionMaxBufferedOps

      public int transactionMaxBufferedOps()
    • transactionMaxParticipantGroupCount

      public int transactionMaxParticipantGroupCount()
    • transactionMaxOperationPayloadBytes

      public int transactionMaxOperationPayloadBytes()
    • dataDir

      public @Nullable String dataDir()
    • persistenceBackupDir

      public @Nullable String persistenceBackupDir()
    • persistenceHotBackupIntervalSeconds

      public long persistenceHotBackupIntervalSeconds()
    • idempotencyTtlMs

      public long idempotencyTtlMs()
    • partitionMigrationCommitTimeoutMs

      public long partitionMigrationCommitTimeoutMs()
    • transactionCommitApplyRetryDelayMs

      public long transactionCommitApplyRetryDelayMs()
    • transactionCommitApplyMaxAttempts

      public int transactionCommitApplyMaxAttempts()
    • configChangeCommitTimeoutMs

      public long configChangeCommitTimeoutMs()
    • shutdownMaxWaitSeconds

      public long shutdownMaxWaitSeconds()
    • adminEnabled

      public boolean adminEnabled()
    • adminPort

      public int adminPort()
    • shutdownHookEnabled

      public boolean shutdownHookEnabled()
    • shutdownHookPolicy

      public ClusterConfig.ShutdownHookPolicy shutdownHookPolicy()
    • healthTlsEnabled

      public boolean healthTlsEnabled()
    • healthTlsPort

      public int healthTlsPort()
    • healthTlsPlainTextDisabled

      public boolean healthTlsPlainTextDisabled()
    • shardingEnabled

      public boolean shardingEnabled()
    • numGroups

      public int numGroups()
    • partitionGroupType

      public PartitionGroupType partitionGroupType()
    • partitionGroupConfig

      public PartitionGroupConfig partitionGroupConfig()
    • wanAcknowledgeType

      public WanAcknowledgeType wanAcknowledgeType()
    • wanPersistReplicatedData

      public boolean wanPersistReplicatedData()
    • wanDurableOutbound

      public boolean wanDurableOutbound()
      Durable (Raft-replicated) active-passive outbound WAN; default off.
    • migrationDurableChunks

      public boolean migrationDurableChunks()
      Durable partition migration (chunks committed through the target group's Raft); default off.
    • clusterDataRecoveryPolicy

      public ClusterDataRecoveryPolicy clusterDataRecoveryPolicy()
    • snapshotThreshold

      public int snapshotThreshold()
    • persistenceValidationTimeoutSeconds

      public long persistenceValidationTimeoutSeconds()
    • persistenceDataLoadTimeoutSeconds

      public long persistenceDataLoadTimeoutSeconds()
    • persistenceRecoveryParallelism

      public int persistenceRecoveryParallelism()
    • maxParallelMigrations

      public int maxParallelMigrations()
    • maxExecutorTaskPayloadBytes

      public int maxExecutorTaskPayloadBytes()
    • readBackupData

      public boolean readBackupData()
    • maxConnections

      public int maxConnections()
    • tcpReadTimeoutMs

      public int tcpReadTimeoutMs()
    • tcpIdleTimeoutMs

      public long tcpIdleTimeoutMs()
    • tcpWriteQueueCapacity

      public int tcpWriteQueueCapacity()
    • tcpAcceptTimeoutMs

      public int tcpAcceptTimeoutMs()
    • tcpAcceptBackoffMaxMs

      public long tcpAcceptBackoffMaxMs()
    • gracefulShutdownDrainMs

      public long gracefulShutdownDrainMs()
    • pipelinedExecution

      public boolean pipelinedExecution()
    • commandQueueCapacity

      public int commandQueueCapacity()
    • commandExecutorThreads

      public int commandExecutorThreads()
    • queueConfigs

      public Map<String, QueueConfig> queueConfigs()
    • priorityQueueConfigs

      public Map<String, PriorityQueueConfig> priorityQueueConfigs()
    • dataConnectionConfigs

      public Map<String, DataConnectionConfig> dataConnectionConfigs()
    • genericMapStoreConfigs

      public Map<String, GenericMapStoreConfig> genericMapStoreConfigs()
    • address

      public String address()