public class ReadOnlyZooKeeperServer extends ZooKeeperServer
The very first processor in the chain of request processors is a ReadOnlyRequestProcessor which drops state-changing requests.
ZooKeeperServer.MissingSessionException, ZooKeeperServer.State
Modifier and Type | Field and Description |
---|---|
protected QuorumPeer |
self |
DEFAULT_TICK_TIME, firstProcessor, jmxDataTreeBean, jmxServerBean, LOG, maxSessionTimeout, minSessionTimeout, ok, secureServerCnxnFactory, serverCnxnFactory, sessionTracker, state, tickTime
Modifier and Type | Method and Description |
---|---|
void |
dumpConf(PrintWriter pwriter) |
long |
getServerId()
Returns the id of the associated QuorumPeer, which will do for a unique
id of this server.
|
String |
getState() |
protected void |
registerJMX() |
void |
registerJMX(ZooKeeperServerBean serverBean,
LocalPeerBean localPeerBean) |
protected void |
setState(ZooKeeperServer.State state)
Sets the state of ZooKeeper server.
|
protected void |
setupRequestProcessors() |
void |
shutdown() |
void |
startup() |
protected void |
unregisterJMX() |
protected void |
unregisterJMX(ZooKeeperServer zks) |
canShutdown, checkPasswd, closeSession, closeSession, createSessionTracker, decInProcess, dumpEphemerals, expire, finishSessionInit, getClientPort, getConf, getDataDirSize, getEphemerals, getGlobalOutstandingLimit, getInProcess, getLastProcessedZxid, getLogDirSize, getMaxClientCnxnsPerHost, getMaxSessionTimeout, getMinSessionTimeout, getNumAliveConnections, getOutstandingRequests, getSecureClientPort, getSecureServerCnxnFactory, getServerCnxnFactory, getSessionExpiryMap, getSessionTracker, getSnapCount, getTickTime, getTxnLogElapsedSyncTime, getTxnLogFactory, getZKDatabase, getZooKeeperServerListener, getZxid, incInProcess, isRunning, killSession, loadData, processConnectRequest, processPacket, processTxn, processTxn, reopenSession, revalidateSession, serverStats, setCreateSessionTrackerServerId, setLocalSessionFlag, setMaxSessionTimeout, setMinSessionTimeout, setOwner, setSecureServerCnxnFactory, setServerCnxnFactory, setTickTime, setTxnLogFactory, setZKDatabase, setZxid, shouldThrottle, shutdown, startdata, startSessionTracker, submitRequest, takeSnapshot, truncateLog
protected final QuorumPeer self
protected void setupRequestProcessors()
setupRequestProcessors
in class ZooKeeperServer
public void startup()
startup
in class ZooKeeperServer
protected void registerJMX()
registerJMX
in class ZooKeeperServer
public void registerJMX(ZooKeeperServerBean serverBean, LocalPeerBean localPeerBean)
protected void unregisterJMX()
unregisterJMX
in class ZooKeeperServer
protected void unregisterJMX(ZooKeeperServer zks)
public String getState()
getState
in interface ServerStats.Provider
getState
in class ZooKeeperServer
public long getServerId()
getServerId
in interface SessionTracker.SessionExpirer
getServerId
in class ZooKeeperServer
public void shutdown()
shutdown
in class ZooKeeperServer
public void dumpConf(PrintWriter pwriter)
dumpConf
in class ZooKeeperServer
protected void setState(ZooKeeperServer.State state)
ZooKeeperServer
The following are the server state transitions:
ZooKeeperServerListenerImpl
notifies any critical resource
error events, e.g., SyncRequestProcessor not being able to write a txn to
disk.setState
in class ZooKeeperServer
state
- new server state.Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.