Package org.apache.zookeeper
Class ZooKeeperMain
- java.lang.Object
- 
- org.apache.zookeeper.ZooKeeperMain
 
- 
 @Public public class ZooKeeperMain extends Object The command line client to ZooKeeper.
- 
- 
Constructor SummaryConstructors Constructor Description ZooKeeperMain(String[] args)ZooKeeperMain(ZooKeeper zk)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddToHistory(int i, String cmd)Makes a list of possible completions, either for commands or for zk nodes if the token to complete begins with /protected voidconnectToZK(String newHost)voidexecuteLine(String line)static List<String>getCommands()booleangetPrintWatches()protected StringgetPrompt()static voidmain(String[] args)static voidprintMessage(String msg)protected booleanprocessCmd(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co)protected booleanprocessZKCmd(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co)
 
- 
- 
- 
Constructor Detail- 
ZooKeeperMainpublic ZooKeeperMain(String[] args) throws IOException, InterruptedException - Throws:
- IOException
- InterruptedException
 
 - 
ZooKeeperMainpublic ZooKeeperMain(ZooKeeper zk) 
 
- 
 - 
Method Detail- 
getPrintWatchespublic boolean getPrintWatches() 
 - 
addToHistoryprotected void addToHistory(int i, String cmd)Makes a list of possible completions, either for commands or for zk nodes if the token to complete begins with /
 - 
getPromptprotected String getPrompt() 
 - 
printMessagepublic static void printMessage(String msg) 
 - 
connectToZKprotected void connectToZK(String newHost) throws InterruptedException, IOException - Throws:
- InterruptedException
- IOException
 
 - 
mainpublic static void main(String[] args) throws IOException, InterruptedException - Throws:
- IOException
- InterruptedException
 
 - 
executeLinepublic void executeLine(String line) throws InterruptedException, IOException - Throws:
- InterruptedException
- IOException
 
 - 
processCmdprotected boolean processCmd(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co) throws IOException, InterruptedException- Throws:
- IOException
- InterruptedException
 
 - 
processZKCmdprotected boolean processZKCmd(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co) throws CliException, IOException, InterruptedException
 
- 
 
-