|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object me.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 int |
DEFAULT_MAX_IDLE
The default max idle number determines how many idle connections may reside in the pool. |
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 long |
DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
|
static int |
DEFAULT_PORT
The default port number to which we will connect |
static long |
DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
|
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)
|
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 int DEFAULT_MAX_IDLE
public static final boolean DEFAULT_LIFO
public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
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 Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int getMaxActive()
public void setMaxActive(int maxActive)
public int getMaxIdle()
public void setMaxIdle(int maxIdle)
public long getMaxWaitTimeWhenExhausted()
public void setMaxWaitTimeWhenExhausted(long maxWaitTimeWhenExhausted)
public ExhaustedPolicy getExhaustedPolicy()
public void setExhaustedPolicy(ExhaustedPolicy exhaustedPolicy)
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 long getMinEvictableIdleTimeMillis()
public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
public long getTimeBetweenEvictionRunsMillis()
public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
public boolean getUseSocketKeepalive()
public void setUseSocketKeepalive(boolean useSocketKeepalive)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |