public class RaftJournalConfiguration extends Object
Constructor and Description |
---|
RaftJournalConfiguration() |
Modifier and Type | Method and Description |
---|---|
static RaftJournalConfiguration |
defaults(NetworkAddressUtils.ServiceType serviceType) |
List<InetSocketAddress> |
getClusterAddresses() |
long |
getElectionTimeoutMs() |
long |
getHeartbeatIntervalMs() |
InetSocketAddress |
getLocalAddress() |
long |
getMaxLogSize() |
File |
getPath() |
InetSocketAddress |
getProxyAddress() |
RaftJournalConfiguration |
setClusterAddresses(List<InetSocketAddress> clusterAddresses) |
RaftJournalConfiguration |
setElectionTimeoutMs(long electionTimeoutMs) |
RaftJournalConfiguration |
setHeartbeatIntervalMs(long heartbeatIntervalMs) |
RaftJournalConfiguration |
setLocalAddress(InetSocketAddress localAddress) |
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 getElectionTimeoutMs()
public long getHeartbeatIntervalMs()
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 setElectionTimeoutMs(long electionTimeoutMs)
electionTimeoutMs
- election timeoutpublic RaftJournalConfiguration setHeartbeatIntervalMs(long heartbeatIntervalMs)
heartbeatIntervalMs
- heartbeat intervalpublic 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 logsCopyright © 2023. All Rights Reserved.