com.netflix.astyanax.connectionpool.impl
Class Slf4jConnectionPoolMonitorImpl

java.lang.Object
  extended by com.netflix.astyanax.connectionpool.impl.CountingConnectionPoolMonitor
      extended by com.netflix.astyanax.connectionpool.impl.Slf4jConnectionPoolMonitorImpl
All Implemented Interfaces:
ConnectionPoolMonitor

public class Slf4jConnectionPoolMonitorImpl
extends CountingConnectionPoolMonitor


Constructor Summary
Slf4jConnectionPoolMonitorImpl()
           
 
Method Summary
 void incConnectionClosed(Host host, Exception reason)
          Closed a connection
 void incConnectionCreateFailed(Host host, Exception reason)
          Attempt to create a connection failed
 void incFailover(Host host, Exception reason)
          An operation failed by the connection pool will attempt to fail over to another host/connection.
 void incOperationFailure(Host host, 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, 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.
 
Methods inherited from class com.netflix.astyanax.connectionpool.impl.CountingConnectionPoolMonitor
getConnectionBorrowedCount, getConnectionClosedCount, getConnectionCreatedCount, getConnectionCreateFailedCount, getConnectionReturnedCount, getFailoverCount, getHostAddedCount, getHostDownCount, getHostReactivatedCount, getHostRemovedCount, getHostStats, getNoHostCount, getNoHostsCount, getNumBusyConnections, getNumOpenConnections, getOperationFailureCount, getOperationSuccessCount, getOperationTimeoutCount, getPoolExhaustedTimeoutCount, incConnectionBorrowed, incConnectionCreated, incConnectionReturned, incNoHosts, incOperationSuccess, incOperationTimeout, incPoolExhaustedTimeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Slf4jConnectionPoolMonitorImpl

public Slf4jConnectionPoolMonitorImpl()
Method Detail

incOperationFailure

public void incOperationFailure(Host host,
                                Exception reason)
Description copied from interface: ConnectionPoolMonitor
Errors trying to execute an operation

Specified by:
incOperationFailure in interface ConnectionPoolMonitor
Overrides:
incOperationFailure in class CountingConnectionPoolMonitor

incConnectionClosed

public void incConnectionClosed(Host host,
                                Exception reason)
Description copied from interface: ConnectionPoolMonitor
Closed a connection

Specified by:
incConnectionClosed in interface ConnectionPoolMonitor
Overrides:
incConnectionClosed in class CountingConnectionPoolMonitor
reason - TODO: Make the host available to this

incConnectionCreateFailed

public void incConnectionCreateFailed(Host host,
                                      Exception reason)
Description copied from interface: ConnectionPoolMonitor
Attempt to create a connection failed

Specified by:
incConnectionCreateFailed in interface ConnectionPoolMonitor
Overrides:
incConnectionCreateFailed in class CountingConnectionPoolMonitor

incFailover

public void incFailover(Host host,
                        Exception reason)
Description copied from interface: ConnectionPoolMonitor
An operation failed by the connection pool will attempt to fail over to another host/connection.

Specified by:
incFailover in interface ConnectionPoolMonitor
Overrides:
incFailover in class CountingConnectionPoolMonitor

onHostAdded

public void onHostAdded(Host host,
                        HostConnectionPool<?> pool)
Description copied from interface: ConnectionPoolMonitor
A host was added and given the associated pool. The pool is immutable and can be used to get info about the number of open connections

Specified by:
onHostAdded in interface ConnectionPoolMonitor
Overrides:
onHostAdded in class CountingConnectionPoolMonitor

onHostRemoved

public void onHostRemoved(Host host)
Description copied from interface: ConnectionPoolMonitor
A host was removed from the pool. This is usually called when a downed host is removed from the ring.

Specified by:
onHostRemoved in interface ConnectionPoolMonitor
Overrides:
onHostRemoved in class CountingConnectionPoolMonitor

onHostDown

public void onHostDown(Host host,
                       Exception reason)
Description copied from interface: ConnectionPoolMonitor
A host was identified as downed.

Specified by:
onHostDown in interface ConnectionPoolMonitor
Overrides:
onHostDown in class CountingConnectionPoolMonitor
reason - Exception that caused the host to be identified as down

onHostReactivated

public void onHostReactivated(Host host,
                              HostConnectionPool<?> pool)
Description copied from interface: ConnectionPoolMonitor
A host was reactivated after being marked down

Specified by:
onHostReactivated in interface ConnectionPoolMonitor
Overrides:
onHostReactivated in class CountingConnectionPoolMonitor


Copyright © 2012. All Rights Reserved.