me.prettyprint.cassandra.connection
Class LatencyAwareHClientPool

java.lang.Object
  extended by me.prettyprint.cassandra.connection.ConcurrentHClientPool
      extended by me.prettyprint.cassandra.connection.LatencyAwareHClientPool
All Implemented Interfaces:
HClientPool, PoolMetric

public class LatencyAwareHClientPool
extends ConcurrentHClientPool

This class provides a queue function of latencies over CHCP, collecting all the latency information and calculates the score (expensive operation).

Author:
Vijay Parthasarathy

Constructor Summary
LatencyAwareHClientPool(CassandraHost host)
           
 
Method Summary
 HThriftClient borrowClient()
           
 void clear()
           
 boolean equals(Object obj)
           
 void releaseClient(HThriftClient client)
           
 void resetIntervel()
           
 
Methods inherited from class me.prettyprint.cassandra.connection.ConcurrentHClientPool
getCassandraHost, getIsActive, getMaxActive, getName, getNumActive, getNumBeforeExhausted, getNumBlockedThreads, getNumIdle, getStatusAsString, isExhausted, shutdown
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LatencyAwareHClientPool

public LatencyAwareHClientPool(CassandraHost host)
Method Detail

borrowClient

public HThriftClient borrowClient()
                           throws HectorException
Specified by:
borrowClient in interface HClientPool
Overrides:
borrowClient in class ConcurrentHClientPool
Throws:
HectorException

releaseClient

public void releaseClient(HThriftClient client)
                   throws HectorException
Specified by:
releaseClient in interface HClientPool
Overrides:
releaseClient in class ConcurrentHClientPool
Throws:
HectorException

resetIntervel

public void resetIntervel()

clear

public void clear()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2011. All Rights Reserved.