public class RaftJournalConfiguration extends Object
Constructor and Description |
---|
RaftJournalConfiguration() |
Modifier and Type | Method and Description |
---|---|
static RaftJournalConfiguration |
defaults(NetworkAddressUtils.ServiceType serviceType) |
List<InetSocketAddress> |
getClusterAddresses() |
InetSocketAddress |
getLocalAddress() |
Integer |
getMaxConcurrencyPoolSize() |
long |
getMaxElectionTimeoutMs() |
long |
getMaxLogSize() |
long |
getMinElectionTimeoutMs() |
File |
getPath() |
InetSocketAddress |
getProxyAddress() |
RaftJournalConfiguration |
setClusterAddresses(List<InetSocketAddress> clusterAddresses) |
RaftJournalConfiguration |
setElectionMaxTimeoutMs(long maxElectionTimeoutMs) |
RaftJournalConfiguration |
setElectionMinTimeoutMs(long minElectionTimeoutMs) |
RaftJournalConfiguration |
setLocalAddress(InetSocketAddress localAddress) |
RaftJournalConfiguration |
setMaxConcurrencyPoolSize(Integer maxConcurrencyPoolSize) |
RaftJournalConfiguration |
setMaxLogSize(long maxLogSize) |
RaftJournalConfiguration |
setPath(File path) |
void |
validate()
Validates the configuration.
|
public static RaftJournalConfiguration defaults(NetworkAddressUtils.ServiceType serviceType)
serviceType
- either master raft service or job master raft servicepublic void validate()
public List<InetSocketAddress> getClusterAddresses()
public long getMinElectionTimeoutMs()
public long getMaxElectionTimeoutMs()
public InetSocketAddress getLocalAddress()
public InetSocketAddress getProxyAddress()
public long getMaxLogSize()
public File getPath()
public RaftJournalConfiguration setClusterAddresses(List<InetSocketAddress> clusterAddresses)
clusterAddresses
- addresses of all nodes in the Raft clusterpublic RaftJournalConfiguration setElectionMinTimeoutMs(long minElectionTimeoutMs)
minElectionTimeoutMs
- min election timeoutpublic RaftJournalConfiguration setElectionMaxTimeoutMs(long maxElectionTimeoutMs)
maxElectionTimeoutMs
- max election timeoutpublic RaftJournalConfiguration setLocalAddress(InetSocketAddress localAddress)
localAddress
- address of this Raft cluster nodepublic RaftJournalConfiguration setMaxLogSize(long maxLogSize)
maxLogSize
- maximum log file sizepublic RaftJournalConfiguration setPath(File path)
path
- where to store journal logspublic Integer getMaxConcurrencyPoolSize()
public RaftJournalConfiguration setMaxConcurrencyPoolSize(Integer maxConcurrencyPoolSize)
maxConcurrencyPoolSize
- max thread size for notifyTermIndexUpdated methodCopyright © 2023. All Rights Reserved.