Package org.ldaptive.pool
Class PooledConnectionStatistics
java.lang.Object
org.ldaptive.pool.PooledConnectionStatistics
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionActive stats.Available stats.private final int
Number of available and active timestamps to store. -
Constructor Summary
ConstructorsConstructorDescriptionPooledConnectionStatistics
(int i) Creates a new pooled connection statistics. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Inserts the current timestamp into the active statistics.void
Inserts the current timestamp into the available statistics.Returns all the active timestamp statistics.Returns all the available timestamp statistics.Returns the last timestamp at which this connection was made active.Returns the last timestamp at which this connection was made available.toString()
-
Field Details
-
size
private final int sizeNumber of available and active timestamps to store. -
availableStats
Available stats. -
activeStats
Active stats.
-
-
Constructor Details
-
PooledConnectionStatistics
public PooledConnectionStatistics(int i) Creates a new pooled connection statistics.- Parameters:
i
- number of timestamps to store
-
-
Method Details
-
getAvailableStats
Returns all the available timestamp statistics.- Returns:
- available timestamp statistics
-
getLastAvailableStat
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
Returns all the active timestamp statistics.- Returns:
- active timestamp statistics
-
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
-