| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final byte | |
| private final PooledConnection | |
| private static final boolean | |
| pack-priv static final byte | |
| pack-priv static final byte | |
| private long | |
| private final ReentrantLock | |
| private byte | |
| private long |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public boolean | equals(Object obj)
Overrides java. Two desc are equal if their PooledConnections are the same. |
| pack-priv boolean | Returns: true if entry is idle and has expired; false otherwise.a connection that has been idle before this time
have expired. threshold)If ConnectionDesc is IDLE and has expired, close the corresponding PooledConnection. |
| pack-priv int | |
| pack-priv long | |
| public int | hashCode()
Overrides java. Hashcode is that of PooledConnection to facilitate searching for a ConnectionDesc using only its PooledConnection. |
| pack-priv boolean | Returns: true if state change occurred.Changes the state of a ConnectionDesc from BUSY to IDLE and records the current time so that we will know how long it has been idle. |
| public String | |
| pack-priv PooledConnection | Returns: ConnectionDesc's PooledConnection if it was idle; null otherwise.If ConnectionDesc is IDLE, change its state to BUSY and return its connection. |
| BUSY | back to summary |
|---|---|
| pack-priv static final byte BUSY | |
| conn | back to summary |
|---|---|
| private final PooledConnection conn | |
| debug | back to summary |
|---|---|
| private static final boolean debug | |
| EXPIRED | back to summary |
|---|---|
| pack-priv static final byte EXPIRED | |
| IDLE | back to summary |
|---|---|
| pack-priv static final byte IDLE | |
| idleSince | back to summary |
|---|---|
| private long idleSince | |
| lock | back to summary |
|---|---|
| private final ReentrantLock lock | |
| state | back to summary |
|---|---|
| private byte state | |
| useCount | back to summary |
|---|---|
| private long useCount | |
| ConnectionDesc | back to summary |
|---|---|
| pack-priv ConnectionDesc(PooledConnection conn) | |
| ConnectionDesc | back to summary |
|---|---|
| pack-priv ConnectionDesc(PooledConnection conn, boolean use) | |
| d | back to summary |
|---|---|
| private void d(String msg) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Two desc are equal if their PooledConnections are the same. This is useful when searching for a ConnectionDesc using only its PooledConnection. | |
| expire | back to summary |
|---|---|
| pack-priv boolean expire(long threshold) If ConnectionDesc is IDLE and has expired, close the corresponding PooledConnection.
| |
| getState | back to summary |
|---|---|
| pack-priv int getState() | |
| getUseCount | back to summary |
|---|---|
| pack-priv long getUseCount() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Hashcode is that of PooledConnection to facilitate searching for a ConnectionDesc using only its PooledConnection. | |
| release | back to summary |
|---|---|
| pack-priv boolean release() Changes the state of a ConnectionDesc from BUSY to IDLE and records the current time so that we will know how long it has been idle.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| tryUse | back to summary |
|---|---|
| pack-priv PooledConnection tryUse() If ConnectionDesc is IDLE, change its state to BUSY and return its connection.
| |