public class JavaDriverConnectionPoolMonitorImpl
extends java.lang.Object
implements com.netflix.astyanax.connectionpool.ConnectionPoolMonitor
| Constructor and Description |
|---|
JavaDriverConnectionPoolMonitorImpl() |
| Modifier and Type | Method and Description |
|---|---|
long |
getBadRequestCount()
Returns the number of requests that returned errors not accounted for by
another metric.
|
long |
getConnectionBorrowedCount() |
long |
getConnectionClosedCount() |
long |
getConnectionCreatedCount() |
long |
getConnectionCreateFailedCount()
Returns the number of connection to Cassandra nodes errors.
|
long |
getConnectionReturnedCount() |
long |
getFailoverCount() |
long |
getHostActiveCount()
Returns the number of Cassandra hosts the driver is currently connected to
(that is have at least one connection opened to).
|
long |
getHostAddedCount() |
long |
getHostCount()
Returns the number of Cassandra hosts currently known by the driver (that is
whether they are currently considered up or down).
|
long |
getHostDownCount() |
long |
getHostRemovedCount() |
java.util.Map<com.netflix.astyanax.connectionpool.Host,com.netflix.astyanax.connectionpool.HostStats> |
getHostStats() |
long |
getInterruptedCount() |
com.codahale.metrics.MetricRegistryListener |
getMetricsRegistryListener() |
long |
getNoHostCount() |
long |
getNumOpenConnections()
Returns the total number of currently opened connections to Cassandra hosts.
|
long |
getOperationFailureCount() |
long |
getOperationSuccessCount() |
long |
getOperationTimeoutCount() |
long |
getPoolExhaustedTimeoutCount() |
long |
getReadTimeouts()
Returns the number of read requests that returned a timeout (independently
of the final decision taken by the
RetryPolicy). |
long |
getSocketTimeoutCount()
Returns the number of times a request was ignored
due to the
RetryPolicy, for
example due to timeouts or unavailability. |
long |
getTransportErrorCount() |
long |
getUnknownErrorCount()
Returns the number of times a request was retried due to the
RetryPolicy. |
long |
getWriteTimeouts()
Returns the number of write requests that returned a timeout (independently
of the final decision taken by the
RetryPolicy). |
void |
incConnectionBorrowed(com.netflix.astyanax.connectionpool.Host host,
long delay) |
void |
incConnectionClosed(com.netflix.astyanax.connectionpool.Host host,
java.lang.Exception reason) |
void |
incConnectionCreated(com.netflix.astyanax.connectionpool.Host host) |
void |
incConnectionCreateFailed(com.netflix.astyanax.connectionpool.Host host,
java.lang.Exception reason) |
void |
incConnectionReturned(com.netflix.astyanax.connectionpool.Host host) |
void |
incFailover(com.netflix.astyanax.connectionpool.Host host,
java.lang.Exception reason) |
void |
incOperationFailure(com.netflix.astyanax.connectionpool.Host host,
java.lang.Exception reason) |
void |
incOperationSuccess(com.netflix.astyanax.connectionpool.Host host,
long latency) |
long |
notFoundCount()
Returns the number of requests that returned an unavailable exception
(independently of the final decision taken by the
RetryPolicy). |
void |
onHostAdded(com.netflix.astyanax.connectionpool.Host host,
com.netflix.astyanax.connectionpool.HostConnectionPool<?> pool) |
void |
onHostDown(com.netflix.astyanax.connectionpool.Host host,
java.lang.Exception reason) |
void |
onHostReactivated(com.netflix.astyanax.connectionpool.Host host,
com.netflix.astyanax.connectionpool.HostConnectionPool<?> pool) |
void |
onHostRemoved(com.netflix.astyanax.connectionpool.Host host) |
JavaDriverConnectionPoolMonitorImpl |
withJavaDriverMetricsRegistry(com.codahale.metrics.MetricRegistryListener metricsRegListener) |
public JavaDriverConnectionPoolMonitorImpl withJavaDriverMetricsRegistry(com.codahale.metrics.MetricRegistryListener metricsRegListener)
public com.codahale.metrics.MetricRegistryListener getMetricsRegistryListener()
public long getHostCount()
getHostCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getHostActiveCount()
getHostActiveCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getNumOpenConnections()
public long getConnectionCreateFailedCount()
This represents the number of times that a request to a Cassandra node has failed due to a connection problem. This thus also corresponds to how often the driver had to pick a fallback host for a request.
You can expect a few connection errors when a Cassandra node fails (or is stopped) ,but if that number grows continuously you likely have a problem.
getConnectionCreateFailedCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getWriteTimeouts()
RetryPolicy).public long getReadTimeouts()
RetryPolicy).public long getBadRequestCount()
getBadRequestCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long notFoundCount()
RetryPolicy).notFoundCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getSocketTimeoutCount()
RetryPolicy, for
example due to timeouts or unavailability.getSocketTimeoutCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorRetryPolicy.public long getUnknownErrorCount()
RetryPolicy.getUnknownErrorCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorRetryPolicy.public void incOperationFailure(com.netflix.astyanax.connectionpool.Host host,
java.lang.Exception reason)
incOperationFailure in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getOperationFailureCount()
getOperationFailureCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void incFailover(com.netflix.astyanax.connectionpool.Host host,
java.lang.Exception reason)
incFailover in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getFailoverCount()
getFailoverCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void incOperationSuccess(com.netflix.astyanax.connectionpool.Host host,
long latency)
incOperationSuccess in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getOperationSuccessCount()
getOperationSuccessCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void incConnectionCreated(com.netflix.astyanax.connectionpool.Host host)
incConnectionCreated in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getConnectionCreatedCount()
getConnectionCreatedCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void incConnectionClosed(com.netflix.astyanax.connectionpool.Host host,
java.lang.Exception reason)
incConnectionClosed in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getConnectionClosedCount()
getConnectionClosedCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void incConnectionCreateFailed(com.netflix.astyanax.connectionpool.Host host,
java.lang.Exception reason)
incConnectionCreateFailed in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void incConnectionBorrowed(com.netflix.astyanax.connectionpool.Host host,
long delay)
incConnectionBorrowed in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getConnectionBorrowedCount()
getConnectionBorrowedCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getConnectionReturnedCount()
getConnectionReturnedCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void incConnectionReturned(com.netflix.astyanax.connectionpool.Host host)
incConnectionReturned in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getPoolExhaustedTimeoutCount()
getPoolExhaustedTimeoutCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getOperationTimeoutCount()
getOperationTimeoutCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getNoHostCount()
getNoHostCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getInterruptedCount()
getInterruptedCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getTransportErrorCount()
getTransportErrorCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getHostAddedCount()
getHostAddedCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getHostRemovedCount()
getHostRemovedCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic long getHostDownCount()
getHostDownCount in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void onHostAdded(com.netflix.astyanax.connectionpool.Host host,
com.netflix.astyanax.connectionpool.HostConnectionPool<?> pool)
onHostAdded in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void onHostRemoved(com.netflix.astyanax.connectionpool.Host host)
onHostRemoved in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void onHostDown(com.netflix.astyanax.connectionpool.Host host,
java.lang.Exception reason)
onHostDown in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic void onHostReactivated(com.netflix.astyanax.connectionpool.Host host,
com.netflix.astyanax.connectionpool.HostConnectionPool<?> pool)
onHostReactivated in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitorpublic java.util.Map<com.netflix.astyanax.connectionpool.Host,com.netflix.astyanax.connectionpool.HostStats> getHostStats()
getHostStats in interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitor