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(HClientFactory clientFactory, CassandraHost host, CassandraClientMonitor monitor)
           
 
Method Summary
 HClient borrowClient()
           
 void clear()
           
 boolean equals(Object obj)
           
 void releaseClient(HClient 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(HClientFactory clientFactory,
                               CassandraHost host,
                               CassandraClientMonitor monitor)
Method Detail

borrowClient

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

releaseClient

public void releaseClient(HClient 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 © 2013. All Rights Reserved.