public class ReadOnlyZooKeeperServer extends QuorumZooKeeperServer
The very first processor in the chain of request processors is a ReadOnlyRequestProcessor which drops state-changing requests.
ZooKeeperServer.BasicDataTreeBuilder, ZooKeeperServer.DataTreeBuilder, ZooKeeperServer.MissingSessionException, ZooKeeperServer.State
self
DEFAULT_TICK_TIME, firstProcessor, jmxDataTreeBean, jmxServerBean, LOG, maxSessionTimeout, minSessionTimeout, ok, sessionTracker, state, tickTime
Modifier and Type | Method and Description |
---|---|
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) |
dumpConf
canShutdown, checkPasswd, closeSession, closeSession, createSessionTracker, decInProcess, dumpEphemerals, expire, finishSessionInit, getClientPort, getGlobalOutstandingLimit, getInProcess, getLastProcessedZxid, getMaxSessionTimeout, getMinSessionTimeout, getNumAliveConnections, getOutstandingRequests, getServerCnxnFactory, getSnapCount, getTickTime, getTxnLogFactory, getZKDatabase, getZooKeeperServerListener, getZxid, incInProcess, isRunning, killSession, loadData, processConnectRequest, processPacket, processTxn, reopenSession, revalidateSession, serverStats, setMaxSessionTimeout, setMinSessionTimeout, setOwner, setServerCnxnFactory, setTickTime, setTxnLogFactory, setZKDatabase, setZxid, shouldThrottle, startdata, startSessionTracker, submitRequest, takeSnapshot, truncateLog
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 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 QuorumZooKeeperServer
state
- new server state.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
Copyright © 2016 The Apache Software Foundation