org.ldaptive.pool
Class PooledConnectionStatistics

java.lang.Object
  extended by org.ldaptive.pool.PooledConnectionStatistics

public class PooledConnectionStatistics
extends Object

Statistics associated with a connection's activity in the pool. Exposes the timestamps when this connection entered both the available pool and the active pool. A size of 512 uses approximately 50 kilobytes of memory per connection.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Constructor Summary
PooledConnectionStatistics(int i)
          Creates a new pooled connection statistics.
 
Method Summary
 void addActiveStat()
          Inserts the current timestamp into the active statistics.
 void addAvailableStat()
          Inserts the current timestamp into the available statistics.
 Deque<Long> getActiveStats()
          Returns all the active timestamp statistics.
 Deque<Long> getAvailableStats()
          Returns all the available timestamp statistics.
 Long getLastActiveStat()
          Returns the last timestamp at which this connection was made active.
 Long getLastAvailableState()
          Returns the last timestamp at which this connection was made available.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PooledConnectionStatistics

public PooledConnectionStatistics(int i)
Creates a new pooled connection statistics.

Parameters:
i - number of timestamps to store
Method Detail

getAvailableStats

public Deque<Long> getAvailableStats()
Returns all the available timestamp statistics.

Returns:
available timestamp statistics

getLastAvailableState

public Long getLastAvailableState()
Returns the last timestamp at which this connection was made available.

Returns:
millisecond timestamp

addAvailableStat

public void addAvailableStat()
Inserts the current timestamp into the available statistics.


getActiveStats

public Deque<Long> getActiveStats()
Returns all the active timestamp statistics.

Returns:
active timestamp statistics

getLastActiveStat

public Long getLastActiveStat()
Returns the last timestamp at which this connection was made active.

Returns:
millisecond timestamp

addActiveStat

public void addActiveStat()
Inserts the current timestamp into the active statistics.


toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.