public class

CountingConnectionPoolMonitor

extends Object
implements ConnectionPoolMonitor
java.lang.Object
   ↳ com.netflix.astyanax.connectionpool.impl.CountingConnectionPoolMonitor
Known Direct Subclasses

Summary

Public Constructors
CountingConnectionPoolMonitor()
Public Methods
long getConnectionBorrowedCount()
long getConnectionClosedCount()
long getConnectionCreateFailedCount()
long getConnectionCreatedCount()
long getConnectionReturnedCount()
long getFailoverCount()
long getHostAddedCount()
long getHostDownCount()
long getHostReactivatedCount()
long getHostRemovedCount()
Map<HostHostStats> 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 incConnectionCreateFailed(Host host, Exception reason)
Attempt to create a connection failed
void incConnectionCreated(Host host)
Created a connection successfully
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()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.netflix.astyanax.connectionpool.ConnectionPoolMonitor

Public Constructors

public CountingConnectionPoolMonitor ()

Public Methods

public long getConnectionBorrowedCount ()

public long getConnectionClosedCount ()

public long getConnectionCreateFailedCount ()

public long getConnectionCreatedCount ()

public long getConnectionReturnedCount ()

public long getFailoverCount ()

public long getHostAddedCount ()

public long getHostDownCount ()

public long getHostReactivatedCount ()

public long getHostRemovedCount ()

public Map<HostHostStats> getHostStats ()

Return a mapping of all hosts and their statistics

public long getNoHostCount ()

public long getNoHostsCount ()

public long getNumBusyConnections ()

public long getNumOpenConnections ()

public long getOperationFailureCount ()

public long getOperationSuccessCount ()

public long getOperationTimeoutCount ()

public long getPoolExhaustedTimeoutCount ()

public void incConnectionBorrowed (Host host, long delay)

Incremented for each connection borrowed

Parameters
host Host from which the connection was borrowed
delay Time spent in the connection pool borrowing the connection

public void incConnectionClosed (Host host, Exception reason)

Closed a connection

Parameters
reason TODO: Make the host available to this

public void incConnectionCreateFailed (Host host, Exception reason)

Attempt to create a connection failed

public void incConnectionCreated (Host host)

Created a connection successfully

public void incConnectionReturned (Host host)

Incremented for each connection returned.

Parameters
host Host to which connection is returned

public void incFailover (Host host, Exception reason)

An operation failed by the connection pool will attempt to fail over to another host/connection.

public void incNoHosts ()

There were no active hosts in the pool to borrow from.

public void incOperationFailure (Host host, Exception reason)

Errors trying to execute an operation

public void incOperationSuccess (Host host, long latency)

Succeeded in executing an operation

public void incOperationTimeout ()

Timeout waiting for a response from the cluster

public void incPoolExhaustedTimeout ()

Timeout trying to get a connection from the pool

public void onHostAdded (Host host, HostConnectionPool<?> pool)

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

public void onHostDown (Host host, Exception reason)

A host was identified as downed.

Parameters
reason Exception that caused the host to be identified as down

public void onHostReactivated (Host host, HostConnectionPool<?> pool)

A host was reactivated after being marked down

public void onHostRemoved (Host host)

A host was removed from the pool. This is usually called when a downed host is removed from the ring.

public String toString ()