|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.astyanax.connectionpool.impl.CountingConnectionPoolMonitor
public class CountingConnectionPoolMonitor
Impl for ConnectionPoolMonitor that employs counters to track stats such as
| Constructor Summary | |
|---|---|
CountingConnectionPoolMonitor()
|
|
| Method Summary | |
|---|---|
long |
getBadRequestCount()
|
long |
getConnectionBorrowedCount()
|
long |
getConnectionClosedCount()
|
long |
getConnectionCreatedCount()
|
long |
getConnectionCreateFailedCount()
|
long |
getConnectionReturnedCount()
|
long |
getFailoverCount()
|
long |
getHostActiveCount()
|
long |
getHostAddedCount()
Return the number of times a host was added to the pool. |
long |
getHostCount()
|
long |
getHostDownCount()
|
long |
getHostReactivatedCount()
|
long |
getHostRemovedCount()
Return the number of times any host was removed to the pool. |
java.util.Map<Host,HostStats> |
getHostStats()
|
long |
getInterruptedCount()
|
long |
getNoHostCount()
|
long |
getNumBusyConnections()
|
long |
getNumOpenConnections()
|
long |
getOperationFailureCount()
|
long |
getOperationSuccessCount()
|
long |
getOperationTimeoutCount()
Timeout waiting for a response from the cluster |
long |
getPoolExhaustedTimeoutCount()
Timeout trying to get a connection from the pool |
long |
getSocketTimeoutCount()
|
long |
getTransportErrorCount()
|
long |
getUnknownErrorCount()
|
void |
incConnectionBorrowed(Host host,
long delay)
Incremented for each connection borrowed |
void |
incConnectionClosed(Host host,
java.lang.Exception reason)
Closed a connection |
void |
incConnectionCreated(Host host)
Created a connection successfully |
void |
incConnectionCreateFailed(Host host,
java.lang.Exception reason)
Attempt to create a connection failed |
void |
incConnectionReturned(Host host)
Incremented for each connection returned. |
void |
incFailover(Host host,
java.lang.Exception reason)
An operation failed but the connection pool will attempt to fail over to another host/connection. |
void |
incOperationFailure(Host host,
java.lang.Exception reason)
Errors trying to execute an operation. |
void |
incOperationSuccess(Host host,
long latency)
Succeeded in executing an operation |
long |
notFoundCount()
|
void |
onHostAdded(Host host,
HostConnectionPool<?> pool)
A host was added and given the associated pool. |
void |
onHostDown(Host host,
java.lang.Exception reason)
A host was identified as downed. |
void |
onHostReactivated(Host host,
HostConnectionPool<?> pool)
A host was reactivated after being marked down |
void |
onHostRemoved(Host host)
A host was removed from the pool. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CountingConnectionPoolMonitor()
| Method Detail |
|---|
public void incOperationFailure(Host host,
java.lang.Exception reason)
ConnectionPoolMonitor
incOperationFailure in interface ConnectionPoolMonitorpublic long getOperationFailureCount()
getOperationFailureCount in interface ConnectionPoolMonitor
public void incOperationSuccess(Host host,
long latency)
ConnectionPoolMonitor
incOperationSuccess in interface ConnectionPoolMonitorpublic long getOperationSuccessCount()
getOperationSuccessCount in interface ConnectionPoolMonitorpublic void incConnectionCreated(Host host)
ConnectionPoolMonitor
incConnectionCreated in interface ConnectionPoolMonitorpublic long getConnectionCreatedCount()
getConnectionCreatedCount in interface ConnectionPoolMonitor
public void incConnectionClosed(Host host,
java.lang.Exception reason)
ConnectionPoolMonitor
incConnectionClosed in interface ConnectionPoolMonitorreason - TODO: Make the host available to thispublic long getConnectionClosedCount()
getConnectionClosedCount in interface ConnectionPoolMonitor
public void incConnectionCreateFailed(Host host,
java.lang.Exception reason)
ConnectionPoolMonitor
incConnectionCreateFailed in interface ConnectionPoolMonitorpublic long getConnectionCreateFailedCount()
getConnectionCreateFailedCount in interface ConnectionPoolMonitor
public void incConnectionBorrowed(Host host,
long delay)
ConnectionPoolMonitor
incConnectionBorrowed in interface ConnectionPoolMonitorhost - Host from which the connection was borroweddelay - Time spent in the connection pool borrowing the connectionpublic long getConnectionBorrowedCount()
getConnectionBorrowedCount in interface ConnectionPoolMonitorpublic void incConnectionReturned(Host host)
ConnectionPoolMonitor
incConnectionReturned in interface ConnectionPoolMonitorhost - Host to which connection is returnedpublic long getConnectionReturnedCount()
getConnectionReturnedCount in interface ConnectionPoolMonitorpublic long getPoolExhaustedTimeoutCount()
ConnectionPoolMonitor
getPoolExhaustedTimeoutCount in interface ConnectionPoolMonitorpublic long getSocketTimeoutCount()
getSocketTimeoutCount in interface ConnectionPoolMonitorpublic long getOperationTimeoutCount()
ConnectionPoolMonitor
getOperationTimeoutCount in interface ConnectionPoolMonitor
public void incFailover(Host host,
java.lang.Exception reason)
ConnectionPoolMonitor
incFailover in interface ConnectionPoolMonitorpublic long getFailoverCount()
getFailoverCount in interface ConnectionPoolMonitor
public void onHostAdded(Host host,
HostConnectionPool<?> pool)
ConnectionPoolMonitor
onHostAdded in interface ConnectionPoolMonitorpublic long getHostAddedCount()
ConnectionPoolMonitor
getHostAddedCount in interface ConnectionPoolMonitorpublic void onHostRemoved(Host host)
ConnectionPoolMonitor
onHostRemoved in interface ConnectionPoolMonitorpublic long getHostRemovedCount()
ConnectionPoolMonitor
getHostRemovedCount in interface ConnectionPoolMonitor
public void onHostDown(Host host,
java.lang.Exception reason)
ConnectionPoolMonitor
onHostDown in interface ConnectionPoolMonitorreason - Exception that caused the host to be identified as downpublic long getHostDownCount()
getHostDownCount in interface ConnectionPoolMonitor
public void onHostReactivated(Host host,
HostConnectionPool<?> pool)
ConnectionPoolMonitor
onHostReactivated in interface ConnectionPoolMonitorpublic long getHostReactivatedCount()
public long getNoHostCount()
getNoHostCount in interface ConnectionPoolMonitorpublic long getUnknownErrorCount()
getUnknownErrorCount in interface ConnectionPoolMonitorpublic long getInterruptedCount()
getInterruptedCount in interface ConnectionPoolMonitorpublic long getTransportErrorCount()
getTransportErrorCount in interface ConnectionPoolMonitorpublic long getBadRequestCount()
getBadRequestCount in interface ConnectionPoolMonitorpublic long getNumBusyConnections()
public long getNumOpenConnections()
public long notFoundCount()
notFoundCount in interface ConnectionPoolMonitorpublic long getHostCount()
getHostCount in interface ConnectionPoolMonitorpublic long getHostActiveCount()
getHostActiveCount in interface ConnectionPoolMonitorpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Map<Host,HostStats> getHostStats()
getHostStats in interface ConnectionPoolMonitor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||