org.apache.solr.cloud
Class ZkTestServer

java.lang.Object
  extended by org.apache.solr.cloud.ZkTestServer

public class ZkTestServer
extends Object


Nested Class Summary
static class ZkTestServer.HostPort
           
 
Field Summary
static int TICK_TIME
           
protected  org.apache.solr.cloud.ZkTestServer.ZKServerMain zkServer
           
 
Constructor Summary
ZkTestServer(String zkDir)
           
ZkTestServer(String zkDir, int port)
           
 
Method Summary
 void expire(long sessionId)
           
 int getPort()
           
 int getTheTickTime()
           
 String getZkAddress()
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TICK_TIME

public static final int TICK_TIME
See Also:
Constant Field Values

zkServer

protected final org.apache.solr.cloud.ZkTestServer.ZKServerMain zkServer
Constructor Detail

ZkTestServer

public ZkTestServer(String zkDir)

ZkTestServer

public ZkTestServer(String zkDir,
                    int port)
Method Detail

getZkHost

public String getZkHost()

getZkAddress

public String getZkAddress()

getPort

public int getPort()

expire

public void expire(long sessionId)

run

public void run()
         throws InterruptedException
Throws:
InterruptedException

shutdown

public void shutdown()
              throws IOException
Throws:
IOException

waitForServerDown

public static boolean waitForServerDown(String hp,
                                        long timeout)

send4LetterWord

public static String send4LetterWord(String host,
                                     int port,
                                     String cmd)
                              throws IOException
Send the 4letterword

Parameters:
host - the destination host
port - the destination port
cmd - the 4letterword
Returns:
server response
Throws:
IOException

parseHostPortList

public static List<ZkTestServer.HostPort> parseHostPortList(String hplist)

getTheTickTime

public int getTheTickTime()

setTheTickTime

public void setTheTickTime(int theTickTime)


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.