public class Slf4jConnectionPoolMonitorImpl extends CountingConnectionPoolMonitor
CountingConnectionPoolMonitor that does not track any internal state / counters. It simply uses a logger to log out the events.
Useful for debugging and basic event tracking.| Constructor and Description |
|---|
Slf4jConnectionPoolMonitorImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
incConnectionClosed(Host host,
java.lang.Exception reason)
Closed a connection
|
void |
incConnectionCreateFailed(Host host,
java.lang.Exception reason)
Attempt to create a connection failed
|
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 |
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.
|
getBadRequestCount, getConnectionBorrowedCount, getConnectionClosedCount, getConnectionCreatedCount, getConnectionCreateFailedCount, getConnectionReturnedCount, getFailoverCount, getHostActiveCount, getHostAddedCount, getHostCount, getHostDownCount, getHostReactivatedCount, getHostRemovedCount, getHostStats, getInterruptedCount, getNoHostCount, getNumBusyConnections, getNumOpenConnections, getOperationFailureCount, getOperationSuccessCount, getOperationTimeoutCount, getPoolExhaustedTimeoutCount, getSocketTimeoutCount, getTransportErrorCount, getUnknownErrorCount, incConnectionBorrowed, incConnectionCreated, incConnectionReturned, incOperationSuccess, notFoundCount, toStringpublic void incOperationFailure(Host host, java.lang.Exception reason)
ConnectionPoolMonitorincOperationFailure in interface ConnectionPoolMonitorincOperationFailure in class CountingConnectionPoolMonitorpublic void incConnectionClosed(Host host, java.lang.Exception reason)
ConnectionPoolMonitorincConnectionClosed in interface ConnectionPoolMonitorincConnectionClosed in class CountingConnectionPoolMonitorreason - TODO: Make the host available to thispublic void incConnectionCreateFailed(Host host, java.lang.Exception reason)
ConnectionPoolMonitorincConnectionCreateFailed in interface ConnectionPoolMonitorincConnectionCreateFailed in class CountingConnectionPoolMonitorpublic void incFailover(Host host, java.lang.Exception reason)
ConnectionPoolMonitorincFailover in interface ConnectionPoolMonitorincFailover in class CountingConnectionPoolMonitorpublic void onHostAdded(Host host, HostConnectionPool<?> pool)
ConnectionPoolMonitoronHostAdded in interface ConnectionPoolMonitoronHostAdded in class CountingConnectionPoolMonitorpublic void onHostRemoved(Host host)
ConnectionPoolMonitoronHostRemoved in interface ConnectionPoolMonitoronHostRemoved in class CountingConnectionPoolMonitorpublic void onHostDown(Host host, java.lang.Exception reason)
ConnectionPoolMonitoronHostDown in interface ConnectionPoolMonitoronHostDown in class CountingConnectionPoolMonitorreason - Exception that caused the host to be identified as downpublic void onHostReactivated(Host host, HostConnectionPool<?> pool)
ConnectionPoolMonitoronHostReactivated in interface ConnectionPoolMonitoronHostReactivated in class CountingConnectionPoolMonitor