public class ZkTestServer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ZkTestServer.HostPort |
Modifier and Type | Field and Description |
---|---|
static int |
TICK_TIME |
protected org.apache.solr.cloud.ZkTestServer.ZKServerMain |
zkServer |
Constructor and Description |
---|
ZkTestServer(String zkDir) |
ZkTestServer(String zkDir,
int port) |
Modifier and Type | Method and Description |
---|---|
void |
expire(long sessionId) |
int |
getPort() |
int |
getTheTickTime() |
String |
getZkAddress() |
String |
getZkDir() |
String |
getZkHost() |
static List<ZkTestServer.HostPort> |
parseHostPortList(String hplist) |
void |
run() |
static String |
send4LetterWord(String host,
int port,
String cmd)
Send the 4letterword
|
void |
setTheTickTime(int theTickTime) |
void |
shutdown() |
static boolean |
waitForServerDown(String hp,
long timeout) |
public static final int TICK_TIME
protected final org.apache.solr.cloud.ZkTestServer.ZKServerMain zkServer
public ZkTestServer(String zkDir)
public ZkTestServer(String zkDir, int port)
public String getZkHost()
public String getZkAddress()
public int getPort()
public void expire(long sessionId)
public void run() throws InterruptedException
InterruptedException
public void shutdown() throws IOException, InterruptedException
IOException
InterruptedException
public static boolean waitForServerDown(String hp, long timeout)
public static String send4LetterWord(String host, int port, String cmd) throws IOException
host
- the destination hostport
- the destination portcmd
- the 4letterwordIOException
public static List<ZkTestServer.HostPort> parseHostPortList(String hplist)
public int getTheTickTime()
public void setTheTickTime(int theTickTime)
public String getZkDir()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.