|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConnectionPoolMonitor
Monitoring interface to receive notification of pool events. A concrete monitor will make event stats available to a monitoring application and may also log events to a log file.
Method Summary | |
---|---|
long |
getConnectionBorrowedCount()
|
long |
getConnectionClosedCount()
|
long |
getConnectionCreatedCount()
|
long |
getConnectionCreateFailedCount()
|
long |
getConnectionReturnedCount()
|
long |
getFailoverCount()
|
Map<Host,HostStats> |
getHostStats()
Return a mapping of all hosts and their statistics |
long |
getNoHostCount()
|
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. |
Method Detail |
---|
void incOperationFailure(Host host, Exception reason)
reason
- host
- long getOperationFailureCount()
void incOperationSuccess(Host host, long latency)
host
- latency
- long getOperationSuccessCount()
void incConnectionCreated(Host host)
long getConnectionCreatedCount()
void incConnectionClosed(Host host, Exception reason)
reason
- TODO: Make the host available to thislong getConnectionClosedCount()
void incConnectionCreateFailed(Host host, Exception reason)
host
- reason
- long getConnectionCreateFailedCount()
void incConnectionBorrowed(Host host, long delay)
host
- Host from which the connection was borroweddelay
- Time spent in the connection pool borrowing the connectionlong getConnectionBorrowedCount()
void incConnectionReturned(Host host)
host
- Host to which connection is returnedlong getConnectionReturnedCount()
void incPoolExhaustedTimeout()
long getPoolExhaustedTimeoutCount()
void incOperationTimeout()
long getOperationTimeoutCount()
void incFailover(Host host, Exception reason)
long getFailoverCount()
void onHostAdded(Host host, HostConnectionPool<?> pool)
host
- pool
- void onHostRemoved(Host host)
host
- void onHostDown(Host host, Exception reason)
host
- reason
- Exception that caused the host to be identified as downvoid onHostReactivated(Host host, HostConnectionPool<?> pool)
host
- pool
- void incNoHosts()
long getNoHostCount()
Map<Host,HostStats> getHostStats()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |