|
||||||||||
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
Constructor Summary | |
---|---|
CountingConnectionPoolMonitor()
|
Method Summary | |
---|---|
long |
getConnectionBorrowedCount()
|
long |
getConnectionClosedCount()
|
long |
getConnectionCreatedCount()
|
long |
getConnectionCreateFailedCount()
|
long |
getConnectionReturnedCount()
|
long |
getFailoverCount()
|
long |
getHostAddedCount()
|
long |
getHostDownCount()
|
long |
getHostReactivatedCount()
|
long |
getHostRemovedCount()
|
Map<Host,HostStats> |
getHostStats()
Return a mapping of all hosts and their statistics |
long |
getNoHostCount()
|
long |
getNoHostsCount()
|
long |
getNumBusyConnections()
|
long |
getNumOpenConnections()
|
long |
getOperationFailureCount()
|
long |
getOperationSuccessCount()
|
long |
getOperationTimeoutCount()
|
long |
getPoolExhaustedTimeoutCount()
|
void |
incConnectionBorrowed(Host host,
long delay)
Incremented for each connection borrowed |
void |
incConnectionClosed(Host host,
Exception reason)
Closed a connection |
void |
incConnectionCreated(Host host)
Created a connection successfully |
void |
incConnectionCreateFailed(Host host,
Exception reason)
Attempt to create a connection failed |
void |
incConnectionReturned(Host host)
Incremented for each connection returned. |
void |
incFailover(Host host,
Exception reason)
An operation failed by the connection pool will attempt to fail over to another host/connection. |
void |
incNoHosts()
There were no active hosts in the pool to borrow from. |
void |
incOperationFailure(Host host,
Exception reason)
Errors trying to execute an operation |
void |
incOperationSuccess(Host host,
long latency)
Succeeded in executing an operation |
void |
incOperationTimeout()
Timeout waiting for a response from the cluster |
void |
incPoolExhaustedTimeout()
Timeout trying to get a connection from the pool |
void |
onHostAdded(Host host,
HostConnectionPool<?> pool)
A host was added and given the associated pool. |
void |
onHostDown(Host host,
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. |
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, Exception reason)
ConnectionPoolMonitor
incOperationFailure
in interface ConnectionPoolMonitor
public long getOperationFailureCount()
getOperationFailureCount
in interface ConnectionPoolMonitor
public void incOperationSuccess(Host host, long latency)
ConnectionPoolMonitor
incOperationSuccess
in interface ConnectionPoolMonitor
public long getOperationSuccessCount()
getOperationSuccessCount
in interface ConnectionPoolMonitor
public void incConnectionCreated(Host host)
ConnectionPoolMonitor
incConnectionCreated
in interface ConnectionPoolMonitor
public long getConnectionCreatedCount()
getConnectionCreatedCount
in interface ConnectionPoolMonitor
public void incConnectionClosed(Host host, Exception reason)
ConnectionPoolMonitor
incConnectionClosed
in interface ConnectionPoolMonitor
reason
- TODO: Make the host available to thispublic long getConnectionClosedCount()
getConnectionClosedCount
in interface ConnectionPoolMonitor
public void incConnectionCreateFailed(Host host, Exception reason)
ConnectionPoolMonitor
incConnectionCreateFailed
in interface ConnectionPoolMonitor
public long getConnectionCreateFailedCount()
getConnectionCreateFailedCount
in interface ConnectionPoolMonitor
public void incConnectionBorrowed(Host host, long delay)
ConnectionPoolMonitor
incConnectionBorrowed
in interface ConnectionPoolMonitor
host
- Host from which the connection was borroweddelay
- Time spent in the connection pool borrowing the connectionpublic long getConnectionBorrowedCount()
getConnectionBorrowedCount
in interface ConnectionPoolMonitor
public void incConnectionReturned(Host host)
ConnectionPoolMonitor
incConnectionReturned
in interface ConnectionPoolMonitor
host
- Host to which connection is returnedpublic long getConnectionReturnedCount()
getConnectionReturnedCount
in interface ConnectionPoolMonitor
public void incPoolExhaustedTimeout()
ConnectionPoolMonitor
incPoolExhaustedTimeout
in interface ConnectionPoolMonitor
public long getPoolExhaustedTimeoutCount()
getPoolExhaustedTimeoutCount
in interface ConnectionPoolMonitor
public void incOperationTimeout()
ConnectionPoolMonitor
incOperationTimeout
in interface ConnectionPoolMonitor
public long getOperationTimeoutCount()
getOperationTimeoutCount
in interface ConnectionPoolMonitor
public void incFailover(Host host, Exception reason)
ConnectionPoolMonitor
incFailover
in interface ConnectionPoolMonitor
public long getFailoverCount()
getFailoverCount
in interface ConnectionPoolMonitor
public void onHostAdded(Host host, HostConnectionPool<?> pool)
ConnectionPoolMonitor
onHostAdded
in interface ConnectionPoolMonitor
public long getHostAddedCount()
public void onHostRemoved(Host host)
ConnectionPoolMonitor
onHostRemoved
in interface ConnectionPoolMonitor
public long getHostRemovedCount()
public void onHostDown(Host host, Exception reason)
ConnectionPoolMonitor
onHostDown
in interface ConnectionPoolMonitor
reason
- Exception that caused the host to be identified as downpublic long getHostDownCount()
public void onHostReactivated(Host host, HostConnectionPool<?> pool)
ConnectionPoolMonitor
onHostReactivated
in interface ConnectionPoolMonitor
public long getHostReactivatedCount()
public void incNoHosts()
ConnectionPoolMonitor
incNoHosts
in interface ConnectionPoolMonitor
public long getNoHostsCount()
public long getNumBusyConnections()
public long getNumOpenConnections()
public String toString()
toString
in class Object
public Map<Host,HostStats> getHostStats()
ConnectionPoolMonitor
getHostStats
in interface ConnectionPoolMonitor
public long getNoHostCount()
getNoHostCount
in interface ConnectionPoolMonitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |