Package com.linecorp.centraldogma.server
Class ZooKeeperReplicationConfig
java.lang.Object
com.linecorp.centraldogma.server.ZooKeeperReplicationConfig
- All Implemented Interfaces:
ReplicationConfig
ZooKeeper-based replication configuration.
-
Field Summary
Fields inherited from interface com.linecorp.centraldogma.server.ReplicationConfig
NONE
-
Constructor Summary
ConstructorDescriptionZooKeeperReplicationConfig
(int serverId, Map<Integer, ZooKeeperServerConfig> servers) Creates a new replication configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the additional ZooKeeper properties.boolean
int
hashCode()
int
Returns the maximum number of log items to keep in ZooKeeper.method()
Returns the desired replication method.long
Returns the minimum allowed age of log items before they are removed from ZooKeeper.int
Returns the number of worker threads dedicated for replication.secret()
Returns the secret string used for authenticating the ZooKeeper peers.Returns the configuration of this ZooKeeper server inservers()
.int
serverId()
Returns the ID of this ZooKeeper server inservers()
.servers()
Returns the configuration of all ZooKeeper servers, keyed by their server IDs.int
Returns the ZooKeeper timeout, in milliseconds.toString()
-
Constructor Details
-
ZooKeeperReplicationConfig
Creates a new replication configuration.- Parameters:
serverId
- the ID of this ZooKeeper server inservers
servers
- the ZooKeeper server addresses, keyed by their ZooKeeper server IDs
-
-
Method Details
-
method
Description copied from interface:ReplicationConfig
Returns the desired replication method.- Specified by:
method
in interfaceReplicationConfig
-
serverId
public int serverId()Returns the ID of this ZooKeeper server inservers()
. -
serverConfig
Returns the configuration of this ZooKeeper server inservers()
. -
servers
Returns the configuration of all ZooKeeper servers, keyed by their server IDs. -
secret
Returns the secret string used for authenticating the ZooKeeper peers. -
additionalProperties
Returns the additional ZooKeeper properties. If unspecified, an emptyMap
is returned. -
timeoutMillis
public int timeoutMillis()Returns the ZooKeeper timeout, in milliseconds. If unspecified, the default of 10000 is returned. -
numWorkers
public int numWorkers()Returns the number of worker threads dedicated for replication. If unspecified, the default of 16 is returned. -
maxLogCount
public int maxLogCount()Returns the maximum number of log items to keep in ZooKeeper. Note that the log items will still not be removed if they are younger thanminLogAgeMillis()
. If unspecified, the default of 1024 is returned. -
minLogAgeMillis
public long minLogAgeMillis()Returns the minimum allowed age of log items before they are removed from ZooKeeper. If unspecified, the default of 1 hour is returned. -
hashCode
public int hashCode() -
equals
-
toString
-