public class

ConnectionPoolConfigurationImpl

extends Object
implements ConnectionPoolConfiguration
java.lang.Object
   ↳ com.netflix.astyanax.connectionpool.impl.ConnectionPoolConfigurationImpl

Summary

Constants
int DEFAULT_CONNECTION_LIMITER_MAX_PENDING_COUNT
int DEFAULT_CONNECTION_LIMITER_WINDOW_SIZE
int DEFAULT_CONNECT_TIMEOUT
int DEFAULT_FAILOVER_COUNT
int DEFAULT_INIT_PER_PARTITION
float DEFAULT_LATENCY_AWARE_BADNESS_THRESHOLD
int DEFAULT_LATENCY_AWARE_RESET_INTERVAL
float DEFAULT_LATENCY_AWARE_SENTINEL_COMPARE
int DEFAULT_LATENCY_AWARE_UPDATE_INTERVAL
int DEFAULT_LATENCY_AWARE_WINDOW_SIZE
int DEFAULT_MAX_ACTIVE_PER_PARTITION
int DEFAULT_MAX_BLOCKED_THREADS_PER_HOST
int DEFAULT_MAX_CONNS
int DEFAULT_MAX_OPERATIONS_PER_CONNECTION
int DEFAULT_MAX_PENDING_CONNECTIONS_PER_HOST
int DEFAULT_MAX_TIMEOUT_COUNT
int DEFAULT_MAX_TIME_WHEN_EXHAUSTED Default values
int DEFAULT_PORT
int DEFAULT_RETRY_DELAY_SLICE
int DEFAULT_RETRY_MAX_DELAY_SLICE
int DEFAULT_RETRY_SUSPEND_WINDOW
int DEFAULT_SOCKET_TIMEOUT
int DEFAULT_TIMEOUT_WINDOW
Fields
public static final BadHostDetector DEFAULT_BAD_HOST_DETECTOR
Public Constructors
ConnectionPoolConfigurationImpl(String name)
Public Methods
AuthenticationCredentials getAuthenticationCredentials()
Can return null if no login required
BadHostDetector getBadHostDetector()
TODO
int getConnectTimeout()
Socket connect timeout
int getConnectionLimiterMaxPendingCount()
Maximum number of connection attempts in a given window
int getConnectionLimiterWindowSize()
Window size for limiting the number of connection open requests
int getInitConnsPerHost()
Initial number of connections created when a connection pool is started
float getLatencyAwareBadnessThreshold()
Return the threshold after which a host will not be considered good enough for executing operations.
int getLatencyAwareResetInterval()
float getLatencyAwareSentinelCompare()
Sentinel compare value for Phi Accrual
int getLatencyAwareUpdateInterval()
int getLatencyAwareWindowSize()
Latency samples window size for scoring algorithm
LatencyScoreStrategy getLatencyScoreStrategy()
TODO
int getMaxBlockedThreadsPerHost()
Get max number of blocked clients for a host.
int getMaxConns()
Maximum number of connections in the pool, not used by all connection pool implementations
int getMaxConnsPerHost()
Maximum number of connections to allocate for a single host's pool
int getMaxFailoverCount()
Get the max number of failover attempts
int getMaxOperationsPerConnection()
Maximum allowed operations per connections before forcing the connection to close
int getMaxPendingConnectionsPerHost()
Maximum number of pending connect attempts per host
int getMaxTimeoutCount()
Number of allowed timeouts within getTimeoutWindow() milliseconds
int getMaxTimeoutWhenExhausted()
Maximum amount of time to wait for a connection to free up when a connection pool is exhausted.
String getName()
Unique name assigned to this connection pool
int getPort()
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
RetryBackoffStrategy getRetryBackoffStrategy()
Return the backoff strategy to use.
int getRetryDelaySlice()
TODO
int getRetryMaxDelaySlice()
TODO
int getRetrySuspendWindow()
TODO
List<Host> getSeedHosts()
Return a list of Host objects from the list of seeds returned by getSeeds().
String getSeeds()
List of comma delimited host:port combinations.
int getSocketTimeout()
Socket read/write timeout
int getTimeoutWindow()
Shut down a host if it times out too many time within this window
ConnectionPoolConfigurationImpl setAuthenticationCredentials(AuthenticationCredentials credentials)
ConnectionPoolConfigurationImpl setBadHostDetector(BadHostDetector badHostDetector)
ConnectionPoolConfigurationImpl setConnectTimeout(int connectTimeout)
ConnectionPoolConfigurationImpl setConnectionLimiterMaxPendingCount(int connectionLimiterMaxPendingCount)
ConnectionPoolConfigurationImpl setConnectionLimiterWindowSize(int pendingConnectionWindowSize)
ConnectionPoolConfigurationImpl setInitConnsPerHost(int initConns)
ConnectionPoolConfigurationImpl setLatencyAwareBadnessThreshold(float threshold)
ConnectionPoolConfigurationImpl setLatencyAwareResetInterval(int latencyAwareResetInterval)
ConnectionPoolConfigurationImpl setLatencyAwareSentinelCompare(float latencyAwareSentinelCompare)
ConnectionPoolConfigurationImpl setLatencyAwareUpdateInterval(int latencyAwareUpdateInterval)
ConnectionPoolConfigurationImpl setLatencyAwareWindowSize(int latencyAwareWindowSize)
ConnectionPoolConfigurationImpl setLatencyScoreStrategy(LatencyScoreStrategy latencyScoreStrategy)
ConnectionPoolConfigurationImpl setMaxBlockedThreadsPerHost(int maxBlockedThreadsPerHost)
ConnectionPoolConfigurationImpl setMaxConns(int maxConns)
ConnectionPoolConfigurationImpl setMaxConnsPerHost(int maxConns)
ConnectionPoolConfigurationImpl setMaxFailoverCount(int maxFailoverCount)
ConnectionPoolConfigurationImpl setMaxOperationsPerConnection(int maxOperationsPerConnection)
ConnectionPoolConfigurationImpl setMaxPendingConnectionsPerHost(int maxPendingConnectionsPerHost)
ConnectionPoolConfigurationImpl setMaxTimeoutCount(int maxTimeoutCount)
ConnectionPoolConfigurationImpl setMaxTimeoutWhenExhausted(int timeout)
ConnectionPoolConfigurationImpl setPort(int port)
ConnectionPoolConfigurationImpl setRetryBackoffStrategy(RetryBackoffStrategy hostRetryBackoffStrategy)
ConnectionPoolConfigurationImpl setRetryDelaySlice(int retryDelaySlice)
ConnectionPoolConfigurationImpl setRetryMaxDelaySlice(int retryMaxDelaySlice)
ConnectionPoolConfigurationImpl setRetrySuspendWindow(int retrySuspendWindow)
ConnectionPoolConfigurationImpl setSeeds(String seeds)
ConnectionPoolConfigurationImpl setSocketTimeout(int socketTimeout)
ConnectionPoolConfigurationImpl setTimeoutWindow(int timeoutWindow)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.netflix.astyanax.connectionpool.ConnectionPoolConfiguration

Constants

public static final int DEFAULT_CONNECTION_LIMITER_MAX_PENDING_COUNT

Constant Value: 50 (0x00000032)

public static final int DEFAULT_CONNECTION_LIMITER_WINDOW_SIZE

Constant Value: 2000 (0x000007d0)

public static final int DEFAULT_CONNECT_TIMEOUT

Constant Value: 2000 (0x000007d0)

public static final int DEFAULT_FAILOVER_COUNT

Constant Value: -1 (0xffffffff)

public static final int DEFAULT_INIT_PER_PARTITION

Constant Value: 0 (0x00000000)

public static final float DEFAULT_LATENCY_AWARE_BADNESS_THRESHOLD

Constant Value: 0.1

public static final int DEFAULT_LATENCY_AWARE_RESET_INTERVAL

Constant Value: 60000 (0x0000ea60)

public static final float DEFAULT_LATENCY_AWARE_SENTINEL_COMPARE

Constant Value: 0.768

public static final int DEFAULT_LATENCY_AWARE_UPDATE_INTERVAL

Constant Value: 10000 (0x00002710)

public static final int DEFAULT_LATENCY_AWARE_WINDOW_SIZE

Constant Value: 100 (0x00000064)

public static final int DEFAULT_MAX_ACTIVE_PER_PARTITION

Constant Value: 3 (0x00000003)

public static final int DEFAULT_MAX_BLOCKED_THREADS_PER_HOST

Constant Value: 10 (0x0000000a)

public static final int DEFAULT_MAX_CONNS

Constant Value: 1 (0x00000001)

public static final int DEFAULT_MAX_OPERATIONS_PER_CONNECTION

Constant Value: 10000 (0x00002710)

public static final int DEFAULT_MAX_PENDING_CONNECTIONS_PER_HOST

Constant Value: 5 (0x00000005)

public static final int DEFAULT_MAX_TIMEOUT_COUNT

Constant Value: 3 (0x00000003)

public static final int DEFAULT_MAX_TIME_WHEN_EXHAUSTED

Default values

Constant Value: 2000 (0x000007d0)

public static final int DEFAULT_PORT

Constant Value: 9160 (0x000023c8)

public static final int DEFAULT_RETRY_DELAY_SLICE

Constant Value: 1000 (0x000003e8)

public static final int DEFAULT_RETRY_MAX_DELAY_SLICE

Constant Value: 10 (0x0000000a)

public static final int DEFAULT_RETRY_SUSPEND_WINDOW

Constant Value: 20000 (0x00004e20)

public static final int DEFAULT_SOCKET_TIMEOUT

Constant Value: 11000 (0x00002af8)

public static final int DEFAULT_TIMEOUT_WINDOW

Constant Value: 10000 (0x00002710)

Fields

public static final BadHostDetector DEFAULT_BAD_HOST_DETECTOR

Public Constructors

public ConnectionPoolConfigurationImpl (String name)

Public Methods

public AuthenticationCredentials getAuthenticationCredentials ()

Can return null if no login required

public BadHostDetector getBadHostDetector ()

TODO

public int getConnectTimeout ()

Socket connect timeout

public int getConnectionLimiterMaxPendingCount ()

Maximum number of connection attempts in a given window

public int getConnectionLimiterWindowSize ()

Window size for limiting the number of connection open requests

public int getInitConnsPerHost ()

Initial number of connections created when a connection pool is started

public float getLatencyAwareBadnessThreshold ()

Return the threshold after which a host will not be considered good enough for executing operations.

Returns
  • Valid values are 0 to 1

public int getLatencyAwareResetInterval ()

public float getLatencyAwareSentinelCompare ()

Sentinel compare value for Phi Accrual

public int getLatencyAwareUpdateInterval ()

public int getLatencyAwareWindowSize ()

Latency samples window size for scoring algorithm

public LatencyScoreStrategy getLatencyScoreStrategy ()

TODO

public int getMaxBlockedThreadsPerHost ()

Get max number of blocked clients for a host.

public int getMaxConns ()

Maximum number of connections in the pool, not used by all connection pool implementations

public int getMaxConnsPerHost ()

Maximum number of connections to allocate for a single host's pool

public int getMaxFailoverCount ()

Get the max number of failover attempts

public int getMaxOperationsPerConnection ()

Maximum allowed operations per connections before forcing the connection to close

public int getMaxPendingConnectionsPerHost ()

Maximum number of pending connect attempts per host

public int getMaxTimeoutCount ()

Number of allowed timeouts within getTimeoutWindow() milliseconds

public int getMaxTimeoutWhenExhausted ()

Maximum amount of time to wait for a connection to free up when a connection pool is exhausted.

public String getName ()

Unique name assigned to this connection pool

public int getPort ()

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

public RetryBackoffStrategy getRetryBackoffStrategy ()

Return the backoff strategy to use.

public int getRetryDelaySlice ()

TODO

public int getRetryMaxDelaySlice ()

TODO

public int getRetrySuspendWindow ()

TODO

public List<Host> getSeedHosts ()

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.

public String getSeeds ()

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.

public int getSocketTimeout ()

Socket read/write timeout

public int getTimeoutWindow ()

Shut down a host if it times out too many time within this window

public ConnectionPoolConfigurationImpl setAuthenticationCredentials (AuthenticationCredentials credentials)

public ConnectionPoolConfigurationImpl setBadHostDetector (BadHostDetector badHostDetector)

public ConnectionPoolConfigurationImpl setConnectTimeout (int connectTimeout)

public ConnectionPoolConfigurationImpl setConnectionLimiterMaxPendingCount (int connectionLimiterMaxPendingCount)

public ConnectionPoolConfigurationImpl setConnectionLimiterWindowSize (int pendingConnectionWindowSize)

public ConnectionPoolConfigurationImpl setInitConnsPerHost (int initConns)

public ConnectionPoolConfigurationImpl setLatencyAwareBadnessThreshold (float threshold)

public ConnectionPoolConfigurationImpl setLatencyAwareResetInterval (int latencyAwareResetInterval)

public ConnectionPoolConfigurationImpl setLatencyAwareSentinelCompare (float latencyAwareSentinelCompare)

public ConnectionPoolConfigurationImpl setLatencyAwareUpdateInterval (int latencyAwareUpdateInterval)

public ConnectionPoolConfigurationImpl setLatencyAwareWindowSize (int latencyAwareWindowSize)

public ConnectionPoolConfigurationImpl setLatencyScoreStrategy (LatencyScoreStrategy latencyScoreStrategy)

public ConnectionPoolConfigurationImpl setMaxBlockedThreadsPerHost (int maxBlockedThreadsPerHost)

public ConnectionPoolConfigurationImpl setMaxConns (int maxConns)

public ConnectionPoolConfigurationImpl setMaxConnsPerHost (int maxConns)

public ConnectionPoolConfigurationImpl setMaxFailoverCount (int maxFailoverCount)

public ConnectionPoolConfigurationImpl setMaxOperationsPerConnection (int maxOperationsPerConnection)

public ConnectionPoolConfigurationImpl setMaxPendingConnectionsPerHost (int maxPendingConnectionsPerHost)

public ConnectionPoolConfigurationImpl setMaxTimeoutCount (int maxTimeoutCount)

public ConnectionPoolConfigurationImpl setMaxTimeoutWhenExhausted (int timeout)

public ConnectionPoolConfigurationImpl setPort (int port)

public ConnectionPoolConfigurationImpl setRetryBackoffStrategy (RetryBackoffStrategy hostRetryBackoffStrategy)

public ConnectionPoolConfigurationImpl setRetryDelaySlice (int retryDelaySlice)

public ConnectionPoolConfigurationImpl setRetryMaxDelaySlice (int retryMaxDelaySlice)

public ConnectionPoolConfigurationImpl setRetrySuspendWindow (int retrySuspendWindow)

public ConnectionPoolConfigurationImpl setSeeds (String seeds)

public ConnectionPoolConfigurationImpl setSocketTimeout (int socketTimeout)

public ConnectionPoolConfigurationImpl setTimeoutWindow (int timeoutWindow)

public String toString ()