public class PooledConnectionStatistics extends Object
Modifier and Type | Field and Description |
---|---|
private Deque<Instant> |
activeStats
Active stats.
|
private Deque<Instant> |
availableStats
Available stats.
|
private int |
size
Number of available and active timestamps to store.
|
Constructor and Description |
---|
PooledConnectionStatistics(int i)
Creates a new pooled connection statistics.
|
Modifier and Type | Method and Description |
---|---|
void |
addActiveStat()
Inserts the current timestamp into the active statistics.
|
void |
addAvailableStat()
Inserts the current timestamp into the available statistics.
|
Deque<Instant> |
getActiveStats()
Returns all the active timestamp statistics.
|
Deque<Instant> |
getAvailableStats()
Returns all the available timestamp statistics.
|
Instant |
getLastActiveStat()
Returns the last timestamp at which this connection was made active.
|
Instant |
getLastAvailableState()
Returns the last timestamp at which this connection was made available.
|
String |
toString() |
public PooledConnectionStatistics(int i)
i
- number of timestamps to storepublic Deque<Instant> getAvailableStats()
public Instant getLastAvailableState()
public void addAvailableStat()
public Deque<Instant> getActiveStats()
public Instant getLastActiveStat()
public void addActiveStat()
Copyright © 2003-2019 Virginia Tech. All Rights Reserved.