org.apache.curator.test
Class InstanceSpec

java.lang.Object
  extended by org.apache.curator.test.InstanceSpec

public class InstanceSpec
extends Object

Abstracts one of the servers in the ensemble


Constructor Summary
InstanceSpec(File dataDirectory, int port, int electionPort, int quorumPort, boolean deleteDataDirectoryOnClose, int serverId)
           
 
Method Summary
 boolean deleteDataDirectoryOnClose()
           
 boolean equals(Object o)
           
 String getConnectString()
           
 File getDataDirectory()
           
 int getElectionPort()
           
 int getPort()
           
 int getQuorumPort()
           
static int getRandomPort()
           
 int getServerId()
           
 int hashCode()
           
static InstanceSpec newInstanceSpec()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstanceSpec

public InstanceSpec(File dataDirectory,
                    int port,
                    int electionPort,
                    int quorumPort,
                    boolean deleteDataDirectoryOnClose,
                    int serverId)
Parameters:
dataDirectory - where to store data/logs/etc.
port - the port to listen on - each server in the ensemble must use a unique port
electionPort - the electionPort to listen on - each server in the ensemble must use a unique electionPort
quorumPort - the quorumPort to listen on - each server in the ensemble must use a unique quorumPort
deleteDataDirectoryOnClose - if true, the data directory will be deleted when TestingCluster.close() is called
serverId - the server ID for the instance
Method Detail

newInstanceSpec

public static InstanceSpec newInstanceSpec()

getRandomPort

public static int getRandomPort()

getServerId

public int getServerId()

getDataDirectory

public File getDataDirectory()

getPort

public int getPort()

getElectionPort

public int getElectionPort()

getQuorumPort

public int getQuorumPort()

getConnectString

public String getConnectString()

deleteDataDirectoryOnClose

public boolean deleteDataDirectoryOnClose()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.