|
||||||||||
| 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_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 |
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 |
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 long DEFAULT_MAX_WAITTIME_WHEN_EXHAUSTED
public static final boolean DEFAULT_LIFO
| 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 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||