Package org.apache.zookeeper.server
Class ZooKeeperServerConf
java.lang.Object
org.apache.zookeeper.server.ZooKeeperServerConf
Configuration data for a
ZooKeeperServer. This class is immutable.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key in the map returned bytoMap()for the client port.static final StringThe key in the map returned bytoMap()for the server socket listen backlog.static final StringThe key in the map returned bytoMap()for the data directory.static final StringThe key in the map returned bytoMap()for the data log directory.static final StringThe key in the map returned bytoMap()for the maximum client connections per host.static final StringThe key in the map returned bytoMap()for the maximum session timeout.static final StringThe key in the map returned bytoMap()for the minimum session timeout.static final StringThe key in the map returned bytoMap()for the server ID.static final StringThe key in the map returned bytoMap()for the tick time. -
Method Summary
Modifier and TypeMethodDescriptionintGets the client port.intReturns the server socket listen backlog length.Gets the data directory.Gets the data log directory.intGets the maximum client connections per host.intGets the maximum session timeout.intGets the minimum session timeout.longGets the server ID.intGets the tick time.toMap()Converts this configuration to a map.
-
Field Details
-
KEY_CLIENT_PORT
The key in the map returned bytoMap()for the client port.- See Also:
-
KEY_DATA_DIR
The key in the map returned bytoMap()for the data directory.- See Also:
-
KEY_DATA_LOG_DIR
The key in the map returned bytoMap()for the data log directory.- See Also:
-
KEY_TICK_TIME
The key in the map returned bytoMap()for the tick time.- See Also:
-
KEY_MAX_CLIENT_CNXNS
The key in the map returned bytoMap()for the maximum client connections per host.- See Also:
-
KEY_MIN_SESSION_TIMEOUT
The key in the map returned bytoMap()for the minimum session timeout.- See Also:
-
KEY_MAX_SESSION_TIMEOUT
The key in the map returned bytoMap()for the maximum session timeout.- See Also:
-
KEY_SERVER_ID
The key in the map returned bytoMap()for the server ID.- See Also:
-
KEY_CLIENT_PORT_LISTEN_BACKLOG
The key in the map returned bytoMap()for the server socket listen backlog.- See Also:
-
-
Method Details
-
getClientPort
public int getClientPort()Gets the client port.- Returns:
- client port
-
getDataDir
Gets the data directory.- Returns:
- data directory
-
getDataLogDir
Gets the data log directory.- Returns:
- data log directory
-
getTickTime
public int getTickTime()Gets the tick time.- Returns:
- tick time
-
getMaxClientCnxnsPerHost
public int getMaxClientCnxnsPerHost()Gets the maximum client connections per host.- Returns:
- maximum client connections per host
-
getMinSessionTimeout
public int getMinSessionTimeout()Gets the minimum session timeout.- Returns:
- minimum session timeout
-
getMaxSessionTimeout
public int getMaxSessionTimeout()Gets the maximum session timeout.- Returns:
- maximum session timeout
-
getServerId
public long getServerId()Gets the server ID.- Returns:
- server ID
-
getClientPortListenBacklog
public int getClientPortListenBacklog()Returns the server socket listen backlog length. -
toMap
Converts this configuration to a map. The returned map is mutable, and changes to it do not reflect back into this configuration.- Returns:
- map representation of configuration
-