类 RaftSysConstants


  • public final class RaftSysConstants
    extends java.lang.Object
    jraft system constants.
    作者:
    liaochuntao
    • 字段详细资料

      • DEFAULT_MAX_BYTE_COUNT_PER_RPC

        public static final int DEFAULT_MAX_BYTE_COUNT_PER_RPC
        The maximum size of each file RPC (snapshot copy) request between nodes is 128 K by default 节点之间每次文件 RPC (snapshot拷贝)请求的最大大小,默认为 128 K
        另请参阅:
        常量字段值
      • DEFAULT_MAX_ENTRIES_SIZE

        public static final int DEFAULT_MAX_ENTRIES_SIZE
        The maximum number of logs sent from the leader to the followers is 1024 by default 从 leader 往 follower 发送的最大日志个数,默认 1024
        另请参阅:
        常量字段值
      • DEFAULT_MAX_BODY_SIZE

        public static final int DEFAULT_MAX_BODY_SIZE
        The maximum body size of the log sent from the leader to the followers is 512K by default 从 leader 往 follower 发送日志的最大 body 大小,默认 512K
        另请参阅:
        常量字段值
      • DEFAULT_MAX_APPEND_BUFFER_SIZE

        public static final int DEFAULT_MAX_APPEND_BUFFER_SIZE
        The maximum size of the log storage buffer is 256K by default 日志存储缓冲区最大大小,默认256K
        另请参阅:
        常量字段值
      • DEFAULT_MAX_ELECTION_DELAY_MS

        public static final int DEFAULT_MAX_ELECTION_DELAY_MS
        The election timer interval will be a random maximum outside the specified time, 1 second by default 选举定时器间隔会在指定时间之外随机的最大范围,默认1秒
        另请参阅:
        常量字段值
      • DEFAULT_ELECTION_HEARTBEAT_FACTOR

        public static final int DEFAULT_ELECTION_HEARTBEAT_FACTOR
        Specifies the ratio of the election timeout to the heartbeat interval. Heartbeat interval is equal to the electionTimeoutMs/electionHeartbeatFactor, default one of 10 points. 指定选举超时时间和心跳间隔时间之间的比值。心跳间隔等于electionTimeoutMs/electionHeartbeatFactor,默认10分之一。
        另请参阅:
        常量字段值
      • DEFAULT_APPLY_BATCH

        public static final int DEFAULT_APPLY_BATCH
        The tasks submitted to the leader will accumulate one batch into the maximum batch size stored in the log, and 32 tasks will be assigned by default 向 leader 提交的任务累积一个批次刷入日志存储的最大批次大小,默认 32 个任务
        另请参阅:
        常量字段值
      • DEFAULT_SYNC

        public static final boolean DEFAULT_SYNC
        Call fsync when necessary when writing log, meta information, and it should always be true 写入日志、元信息的时候必要的时候调用 fsync,通常都应该为 true
        另请参阅:
        常量字段值
      • DEFAULT_SYNC_META

        public static final boolean DEFAULT_SYNC_META
        If fsync is called by writing snapshot/raft information, the default is false. If sync is true, it is better to respect sync 写入 snapshot/raft 元信息是否调用 fsync,默认为 false,在 sync 为 true 的情况下,优选尊重 sync
        另请参阅:
        常量字段值
      • DEFAULT_DISRUPTOR_BUFFER_SIZE

        public static final int DEFAULT_DISRUPTOR_BUFFER_SIZE
        Internal disruptor buffer size, need to be appropriately adjusted for high write throughput applications, default 16384 内部 disruptor buffer 大小,如果是写入吞吐量较高的应用,需要适当调高该值,默认 16384
        另请参阅:
        常量字段值
      • DEFAULT_REPLICATOR_PIPELINE

        public static final boolean DEFAULT_REPLICATOR_PIPELINE
        Whether to enable replicated pipeline request optimization by default 是否启用复制的 pipeline 请求优化,默认打开
        另请参阅:
        常量字段值
      • DEFAULT_MAX_REPLICATOR_INFLIGHT_MSGS

        public static final int DEFAULT_MAX_REPLICATOR_INFLIGHT_MSGS
        Maximum in-flight requests with pipeline requests enabled, 256 by default 在启用 pipeline 请求情况下,最大 in-flight 请求数,默认256
        另请参阅:
        常量字段值
      • DEFAULT_ENABLE_LOG_ENTRY_CHECKSUM

        public static final boolean DEFAULT_ENABLE_LOG_ENTRY_CHECKSUM
        Whether LogEntry checksum is enabled 是否启用 LogEntry checksum
        另请参阅:
        常量字段值
      • RAFT_ELECTION_TIMEOUT_MS

        public static final java.lang.String RAFT_ELECTION_TIMEOUT_MS
        Election timeout in milliseconds
        另请参阅:
        常量字段值
      • RAFT_SNAPSHOT_INTERVAL_SECS

        public static final java.lang.String RAFT_SNAPSHOT_INTERVAL_SECS
        Snapshot interval in seconds
        另请参阅:
        常量字段值
      • REQUEST_FAILOVER_RETRIES

        public static final java.lang.String REQUEST_FAILOVER_RETRIES
        Requested retries
        另请参阅:
        常量字段值
      • RAFT_CORE_THREAD_NUM

        public static final java.lang.String RAFT_CORE_THREAD_NUM
        raft internal worker threads
        另请参阅:
        常量字段值
      • RAFT_CLI_SERVICE_THREAD_NUM

        public static final java.lang.String RAFT_CLI_SERVICE_THREAD_NUM
        Number of threads required for raft business request processing
        另请参阅:
        常量字段值
      • RAFT_READ_INDEX_TYPE

        public static final java.lang.String RAFT_READ_INDEX_TYPE
        raft linear read strategy, defaults to read_index read
        另请参阅:
        常量字段值
      • RAFT_RPC_REQUEST_TIMEOUT_MS

        public static final java.lang.String RAFT_RPC_REQUEST_TIMEOUT_MS
        rpc request timeout, default 5 seconds
        另请参阅:
        常量字段值
      • MAX_BYTE_COUNT_PER_RPC

        public static final java.lang.String MAX_BYTE_COUNT_PER_RPC
        Maximum size of each file RPC (snapshot copy) request between nodes, default is 128 K
        另请参阅:
        常量字段值
      • MAX_ENTRIES_SIZE

        public static final java.lang.String MAX_ENTRIES_SIZE
        Maximum number of logs sent from leader to follower, default is 1024
        另请参阅:
        常量字段值
      • MAX_BODY_SIZE

        public static final java.lang.String MAX_BODY_SIZE
        Maximum body size for sending logs from leader to follower, default is 512K
        另请参阅:
        常量字段值
      • MAX_APPEND_BUFFER_SIZE

        public static final java.lang.String MAX_APPEND_BUFFER_SIZE
        Maximum log storage buffer size, default 256K
        另请参阅:
        常量字段值
      • MAX_ELECTION_DELAY_MS

        public static final java.lang.String MAX_ELECTION_DELAY_MS
        Election timer interval will be a random maximum outside the specified time, default is 1 second
        另请参阅:
        常量字段值
      • ELECTION_HEARTBEAT_FACTOR

        public static final java.lang.String ELECTION_HEARTBEAT_FACTOR
        Specify the ratio between election timeout and heartbeat interval. Heartbeat interval is equal to electionTimeoutMs/electionHeartbeatFactor,One tenth by default.
        另请参阅:
        常量字段值
      • APPLY_BATCH

        public static final java.lang.String APPLY_BATCH
        The tasks submitted to the leader accumulate the maximum batch size of a batch flush log storage. The default is 32 tasks.
        另请参阅:
        常量字段值
      • SYNC

        public static final java.lang.String SYNC
        Call fsync when necessary when writing logs and meta information, usually should be true
        另请参阅:
        常量字段值
      • SYNC_META

        public static final java.lang.String SYNC_META
        Whether to write snapshot / raft meta-information to call fsync. The default is false. When sync is true, it is preferred to respect sync.
        另请参阅:
        常量字段值
      • DISRUPTOR_BUFFER_SIZE

        public static final java.lang.String DISRUPTOR_BUFFER_SIZE
        Internal disruptor buffer size. For applications with high write throughput, you need to increase this value. The default value is 16384.
        另请参阅:
        常量字段值
      • REPLICATOR_PIPELINE

        public static final java.lang.String REPLICATOR_PIPELINE
        Whether to enable replication of pipeline request optimization, which is enabled by default
        另请参阅:
        常量字段值
      • MAX_REPLICATOR_INFLIGHT_MSGS

        public static final java.lang.String MAX_REPLICATOR_INFLIGHT_MSGS
        Maximum number of in-flight requests with pipeline requests enabled, default is 256
        另请参阅:
        常量字段值
      • ENABLE_LOG_ENTRY_CHECKSUM

        public static final java.lang.String ENABLE_LOG_ENTRY_CHECKSUM
        Whether to enable LogEntry checksum
        另请参阅:
        常量字段值
    • 构造器详细资料

      • RaftSysConstants

        public RaftSysConstants()