com.netflix.astyanax.connectionpool
Interface ConnectionPoolConfiguration

All Known Implementing Classes:
ConnectionPoolConfigurationImpl

public interface ConnectionPoolConfiguration


Method Summary
 AuthenticationCredentials getAuthenticationCredentials()
           
 BadHostDetector getBadHostDetector()
          TODO
 int getBlockedThreadThreshold()
           
 int getConnectionLimiterMaxPendingCount()
           
 int getConnectionLimiterWindowSize()
           
 int getConnectTimeout()
           
 java.util.concurrent.ScheduledExecutorService getHostReconnectExecutor()
           
 HostSelectorStrategy getHostSelectorStrategy()
           
 int getInitConnsPerHost()
           
 float getLatencyAwareBadnessThreshold()
           
 int getLatencyAwareResetInterval()
          TODO
 float getLatencyAwareSentinelCompare()
           
 int getLatencyAwareUpdateInterval()
          TODO
 int getLatencyAwareWindowSize()
           
 LatencyScoreStrategy getLatencyScoreStrategy()
          TODO
 java.lang.String getLocalDatacenter()
           
 java.util.concurrent.ScheduledExecutorService getMaintainanceScheduler()
           
 int getMaxBlockedThreadsPerHost()
           
 int getMaxConns()
           
 int getMaxConnsPerHost()
           
 int getMaxFailoverCount()
           
 int getMaxOperationsPerConnection()
           
 int getMaxPendingConnectionsPerHost()
           
 int getMaxTimeoutCount()
           
 int getMaxTimeoutWhenExhausted()
           
 float getMinHostInPoolRatio()
           
 java.lang.String getName()
           
 OperationFilterFactory getOperationFilterFactory()
           
 Partitioner getPartitioner()
           
 int getPort()
           
 RetryBackoffStrategy getRetryBackoffStrategy()
           
 int getRetryDelaySlice()
          TODO
 int getRetryMaxDelaySlice()
          TODO
 int getRetrySuspendWindow()
          TODO
 java.util.List<Host> getSeedHosts()
           
 java.lang.String getSeeds()
           
 int getSocketTimeout()
           
 SSLConnectionContext getSSLConnectionContext()
           
 int getTimeoutWindow()
           
 void initialize()
          Initialization prior to starting the connection pool
 void shutdown()
          Shutdown after stopping the connection pool
 

Method Detail

getLatencyScoreStrategy

LatencyScoreStrategy getLatencyScoreStrategy()
TODO


getBadHostDetector

BadHostDetector getBadHostDetector()
TODO


getPort

int getPort()
Returns:
Data port to be used when no port is specified to a list of seeds or when doing a ring describe since the ring describe does not include a host

getName

java.lang.String getName()
Returns:
Unique name assigned to this connection pool

getMaxConnsPerHost

int getMaxConnsPerHost()
Returns:
Maximum number of connections to allocate for a single host's pool

getInitConnsPerHost

int getInitConnsPerHost()
Returns:
Initial number of connections created when a connection pool is started

getMaxConns

int getMaxConns()
Returns:
Maximum number of connections in the pool, not used by all connection pool implementations

getMaxTimeoutWhenExhausted

int getMaxTimeoutWhenExhausted()
Returns:
Maximum amount of time to wait for a connection to free up when a connection pool is exhausted.

getMaxFailoverCount

int getMaxFailoverCount()
Returns:
Get the max number of failover attempts

getRetryBackoffStrategy

RetryBackoffStrategy getRetryBackoffStrategy()
Returns:
Return the backoff strategy to use.
See Also:
RetryBackoffStrategy

getHostSelectorStrategy

HostSelectorStrategy getHostSelectorStrategy()
Returns:
Return the host selector strategy to use.
See Also:
HostSelectorStrategy

getSeeds

java.lang.String getSeeds()
Returns:
List of comma delimited host:port combinations. If port is not provided then getPort() will be used by default. This list must contain at least one valid host other it would not be possible to do a ring describe.

getSeedHosts

java.util.List<Host> getSeedHosts()
Returns:
Return a list of Host objects from the list of seeds returned by getSeeds(). This list must contain at least one valid host other it would not be possible to do a ring describe.

getLocalDatacenter

java.lang.String getLocalDatacenter()
Returns:
Return local datacenter name.

getSocketTimeout

int getSocketTimeout()
Returns:
Socket read/write timeout

getConnectTimeout

int getConnectTimeout()
Returns:
Socket connect timeout

getConnectionLimiterWindowSize

int getConnectionLimiterWindowSize()
Returns:
Window size for limiting the number of connection open requests

getConnectionLimiterMaxPendingCount

int getConnectionLimiterMaxPendingCount()
Returns:
Maximum number of connection attempts in a given window

getLatencyAwareWindowSize

int getLatencyAwareWindowSize()
Returns:
Latency samples window size for scoring algorithm

getLatencyAwareSentinelCompare

float getLatencyAwareSentinelCompare()
Returns:
Sentinel compare value for Phi Accrual

getLatencyAwareBadnessThreshold

float getLatencyAwareBadnessThreshold()
Returns:
Return the threshold after which a host will not be considered good enough for executing operations.

getBlockedThreadThreshold

int getBlockedThreadThreshold()
Returns:
Return the threshold for disabling hosts that have nBlockedThreads more than the least blocked host. The idea here is to quarantine hosts that are slow to respond and free up connections.

getMinHostInPoolRatio

float getMinHostInPoolRatio()
Returns:
Return the ratio for keeping a minimum number of hosts in the pool even if they are slow or are blocked. For example, a ratio of 0.75 with a connection pool of 12 hosts will ensure that no more than 4 hosts can be quaratined.

getLatencyAwareUpdateInterval

int getLatencyAwareUpdateInterval()
TODO


getLatencyAwareResetInterval

int getLatencyAwareResetInterval()
TODO


getMaxPendingConnectionsPerHost

int getMaxPendingConnectionsPerHost()
Returns:
Maximum number of pending connect attempts per host

getMaxBlockedThreadsPerHost

int getMaxBlockedThreadsPerHost()
Returns:
Get max number of blocked clients for a host.

getTimeoutWindow

int getTimeoutWindow()
Returns:
Shut down a host if it times out too many time within this window

getMaxTimeoutCount

int getMaxTimeoutCount()
Returns:
Number of allowed timeouts within getTimeoutWindow() milliseconds

getRetrySuspendWindow

int getRetrySuspendWindow()
TODO


getRetryMaxDelaySlice

int getRetryMaxDelaySlice()
TODO


getRetryDelaySlice

int getRetryDelaySlice()
TODO


getMaxOperationsPerConnection

int getMaxOperationsPerConnection()
Returns:
Maximum allowed operations per connections before forcing the connection to close

getAuthenticationCredentials

AuthenticationCredentials getAuthenticationCredentials()
Returns:
Can return null if no login required

getOperationFilterFactory

OperationFilterFactory getOperationFilterFactory()
Returns:
Return factory that will wrap an operation with filters, such as logging filters and simulation filters

getPartitioner

Partitioner getPartitioner()
Returns:
Get the partitioner used to convert row keys to TOKEN

getSSLConnectionContext

SSLConnectionContext getSSLConnectionContext()
Returns:
Retrieve a context to determine if connections should be made using SSL.

getMaintainanceScheduler

java.util.concurrent.ScheduledExecutorService getMaintainanceScheduler()
Returns:
Return executor service used for maintenance tasks. This pool is used for internal operations that update stats such as token aware scores. Threads in this pool and not expected to block on I/O and the pool can therefore be very small

getHostReconnectExecutor

java.util.concurrent.ScheduledExecutorService getHostReconnectExecutor()
Returns:
Return executor service used to reconnect hosts. Keep in mind that the threads may be blocked for an extended duration while trying to reconnect to a downed host

initialize

void initialize()
Initialization prior to starting the connection pool


shutdown

void shutdown()
Shutdown after stopping the connection pool