|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectme.prettyprint.cassandra.service.CassandraHost
public final class CassandraHost
Encapsulates the information required for connecting to a Cassandra host. Also exposes pool configuration parameters for that host.
| Field Summary | |
|---|---|
static boolean |
DEFAULT_LIFO
|
static int |
DEFAULT_MAX_ACTIVE
|
static long |
DEFAULT_MAX_CONNECT_TIME
The default number of milliseconds (since creation time) we'll allow a connection to stay open. |
static int |
DEFAULT_MAX_FRAME_SIZE
By default, match TFramedTransport's default max frame size (Integer.MAX_VALUE). |
static long |
DEFAULT_MAX_LAST_SUCCESS_TIME
The default number of milliseconds (since last success) we'll allow a connection to stay open. |
static long |
DEFAULT_MAX_WAITTIME_WHEN_EXHAUSTED
The default max wait time when exhausted happens, default value is negative, which means it'll block indefinitely. |
static int |
DEFAULT_PORT
The default port number to which we will connect |
static boolean |
DEFAULT_USE_FRAMED_THRIFT_TRANSPORT
By default, we will use TSocket transport on thrift (matches default Cassandra configs) |
| Constructor Summary | |
|---|---|
CassandraHost(String url)
|
|
CassandraHost(String url2,
int port)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Returns true if the ip and port are equal |
int |
getCassandraThriftSocketTimeout()
|
String |
getHost()
|
String |
getIp()
|
boolean |
getLifo()
|
int |
getMaxActive()
|
long |
getMaxConnectTimeMillis()
|
int |
getMaxFrameSize()
|
long |
getMaxLastSuccessTimeMillis()
|
long |
getMaxWaitTimeWhenExhausted()
|
String |
getName()
|
int |
getPort()
|
String |
getUrl()
|
boolean |
getUseSocketKeepalive()
|
boolean |
getUseThriftFramedTransport()
|
int |
hashCode()
|
boolean |
isPerformNameResolution()
Checks whether name resolution should occur. |
static String |
parseHostFromUrl(String urlPort)
|
static int |
parsePortFromUrl(String urlPort)
|
void |
setCassandraThriftSocketTimeout(int cassandraThriftSocketTimeout)
|
void |
setLifo(boolean lifo)
|
void |
setMaxActive(int maxActive)
|
void |
setMaxConnectTimeMillis(long maxConnectTimeMillis)
|
void |
setMaxFrameSize(int maxFrameSize)
|
void |
setMaxLastSuccessTimeMillis(long maxLastSuccessTimeMillis)
|
void |
setMaxWaitTimeWhenExhausted(long maxWaitTimeWhenExhausted)
|
void |
setUseSocketKeepalive(boolean useSocketKeepalive)
|
void |
setUseThriftFramedTransport(boolean useThriftFramedTransport)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_PORT
public static final int DEFAULT_MAX_ACTIVE
public static final boolean DEFAULT_USE_FRAMED_THRIFT_TRANSPORT
public static final int DEFAULT_MAX_FRAME_SIZE
public static final long DEFAULT_MAX_WAITTIME_WHEN_EXHAUSTED
public static final boolean DEFAULT_LIFO
public static final long DEFAULT_MAX_CONNECT_TIME
public static final long DEFAULT_MAX_LAST_SUCCESS_TIME
| Constructor Detail |
|---|
public CassandraHost(String url)
public CassandraHost(String url2,
int port)
| Method Detail |
|---|
public String getUrl()
public boolean isPerformNameResolution()
public String getName()
public String getHost()
public String getIp()
public int getPort()
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int getMaxActive()
public void setMaxActive(int maxActive)
public long getMaxWaitTimeWhenExhausted()
public void setMaxWaitTimeWhenExhausted(long maxWaitTimeWhenExhausted)
public int getCassandraThriftSocketTimeout()
public void setCassandraThriftSocketTimeout(int cassandraThriftSocketTimeout)
public boolean getUseThriftFramedTransport()
public void setUseThriftFramedTransport(boolean useThriftFramedTransport)
public int getMaxFrameSize()
public void setMaxFrameSize(int maxFrameSize)
public static String parseHostFromUrl(String urlPort)
public static int parsePortFromUrl(String urlPort)
public boolean getLifo()
public void setLifo(boolean lifo)
public boolean getUseSocketKeepalive()
public void setUseSocketKeepalive(boolean useSocketKeepalive)
public long getMaxConnectTimeMillis()
public void setMaxConnectTimeMillis(long maxConnectTimeMillis)
public long getMaxLastSuccessTimeMillis()
public void setMaxLastSuccessTimeMillis(long maxLastSuccessTimeMillis)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||