public class InstanceSpec extends Object
Constructor and Description |
---|
InstanceSpec(File dataDirectory,
int port,
int electionPort,
int quorumPort,
boolean deleteDataDirectoryOnClose,
int serverId) |
Modifier and Type | Method and Description |
---|---|
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() |
public InstanceSpec(File dataDirectory, int port, int electionPort, int quorumPort, boolean deleteDataDirectoryOnClose, int serverId)
dataDirectory
- where to store data/logs/etc.port
- the port to listen on - each server in the ensemble must use a unique portelectionPort
- the electionPort to listen on - each server in the ensemble must use a unique electionPortquorumPort
- the quorumPort to listen on - each server in the ensemble must use a unique quorumPortdeleteDataDirectoryOnClose
- if true, the data directory will be deleted when TestingCluster.close()
is calledserverId
- the server ID for the instancepublic static InstanceSpec newInstanceSpec()
public static int getRandomPort()
public int getServerId()
public File getDataDirectory()
public int getPort()
public int getElectionPort()
public int getQuorumPort()
public String getConnectString()
public boolean deleteDataDirectoryOnClose()
Copyright © 2011–2013 The Apache Software Foundation. All rights reserved.