Class AbstractFourLetterCommand
- java.lang.Object
-
- org.apache.zookeeper.server.command.AbstractFourLetterCommand
-
- Direct Known Subclasses:
CnxnStatResetCommand,ConfCommand,ConsCommand,DigestCommand,DirsCommand,DumpCommand,EnvCommand,IsroCommand,MonitorCommand,NopCommand,RuokCommand,SetTraceMaskCommand,StatCommand,StatResetCommand,TraceMaskCommand,WatchCommand
public abstract class AbstractFourLetterCommand extends java.lang.ObjectSet of threads for command ports. All the 4 letter commands are run via a thread. Each class maps to a corresponding 4 letter command. CommandThread is the abstract class from which all the others inherit.
-
-
Field Summary
Fields Modifier and Type Field Description protected ServerCnxnFactoryfactoryprotected java.io.PrintWriterpwprotected ServerCnxnserverCnxnstatic java.lang.StringZK_NOT_SERVINGprotected ZooKeeperServerzkServer
-
Constructor Summary
Constructors Constructor Description AbstractFourLetterCommand(java.io.PrintWriter pw, ServerCnxn serverCnxn)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcommandRun()voidrun()voidsetFactory(ServerCnxnFactory factory)voidsetZkServer(ZooKeeperServer zkServer)voidstart()
-
-
-
Field Detail
-
ZK_NOT_SERVING
public static final java.lang.String ZK_NOT_SERVING
- See Also:
- Constant Field Values
-
pw
protected java.io.PrintWriter pw
-
serverCnxn
protected ServerCnxn serverCnxn
-
zkServer
protected ZooKeeperServer zkServer
-
factory
protected ServerCnxnFactory factory
-
-
Constructor Detail
-
AbstractFourLetterCommand
public AbstractFourLetterCommand(java.io.PrintWriter pw, ServerCnxn serverCnxn)
-
-
Method Detail
-
start
public void start()
-
run
public void run()
-
setZkServer
public void setZkServer(ZooKeeperServer zkServer)
-
setFactory
public void setFactory(ServerCnxnFactory factory)
-
commandRun
public abstract void commandRun() throws java.io.IOException- Throws:
java.io.IOException
-
-