@InterfaceAudience.Public public class ZooKeeperMain extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.zookeeper.ZooKeeperMain.MyCommandOptions |
cl |
protected int |
commandCount |
protected int |
exitCode |
protected HashMap<Integer,String> |
history |
protected String |
host |
protected boolean |
printWatches |
protected ZooKeeper |
zk |
Constructor and Description |
---|
ZooKeeperMain(String[] args) |
ZooKeeperMain(ZooKeeper zk) |
Modifier and Type | Method and Description |
---|---|
protected 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 /
|
protected void |
connectToZK(String newHost) |
void |
executeLine(String line) |
static List<String> |
getCommands() |
boolean |
getPrintWatches() |
protected String |
getPrompt() |
static void |
main(String[] args) |
static void |
printMessage(String msg) |
protected boolean |
processCmd(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co) |
protected boolean |
processZKCmd(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co) |
protected org.apache.zookeeper.ZooKeeperMain.MyCommandOptions cl
protected int commandCount
protected boolean printWatches
protected int exitCode
protected ZooKeeper zk
protected String host
public ZooKeeperMain(String[] args) throws IOException, InterruptedException
IOException
InterruptedException
public ZooKeeperMain(ZooKeeper zk)
public boolean getPrintWatches()
protected void addToHistory(int i, String cmd)
protected String getPrompt()
public static void printMessage(String msg)
protected void connectToZK(String newHost) throws InterruptedException, IOException
InterruptedException
IOException
public static void main(String[] args) throws IOException, InterruptedException
IOException
InterruptedException
public void executeLine(String line) throws InterruptedException, IOException
InterruptedException
IOException
protected boolean processCmd(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co) throws IOException, InterruptedException
IOException
InterruptedException
protected boolean processZKCmd(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co) throws CliException, IOException, InterruptedException
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.