The connection contained by the pool entry may have an expiration time which
can be either set upon construction time or updated with
the updateExpiry(long, TimeUnit).
Pool entry may also have an object associated with it that represents a connection state (usually a security principal or a unique token identifying the user whose credentials have been used while establishing the connection).
| Modifier and Type | Field and Description |
|---|---|
| private final C | |
| private final long | |
| private long | |
| private final String | |
| private final T | |
| private volatile Object | |
| private long | |
| private final long |
| Access | Constructor and Description |
|---|---|
| public | PoolEntry(final String
unique identifier of the pool entry. May be id, final T null.route to the opposite endpoint. route, final C the connection. conn, final long maximum time to live. May be zero if the connection
does not have an expiry deadline. timeToLive, final TimeUnit time unit. timeUnit)Creates new |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public C | |
| public long | |
| public synchronized long | |
| public String | |
| public T | |
| public Object | |
| public synchronized long | |
| public long | |
| public long | |
| public abstract boolean | |
| public synchronized boolean | |
| public void | |
| public String | |
| public synchronized void |
| conn | back to summary |
|---|---|
| private final C conn | |
| created | back to summary |
|---|---|
| private final long created | |
| expiry | back to summary |
|---|---|
| private long expiry | |
| id | back to summary |
|---|---|
| private final String id | |
| route | back to summary |
|---|---|
| private final T route | |
| state | back to summary |
|---|---|
| private volatile Object state | |
| updated | back to summary |
|---|---|
| private long updated | |
| validityDeadline | back to summary |
|---|---|
| private final long validityDeadline | |
| PoolEntry | back to summary |
|---|---|
| public PoolEntry(final String id, final T route, final C conn, final long timeToLive, final TimeUnit timeUnit) Creates new | |
| PoolEntry | back to summary |
|---|---|
| public PoolEntry(final String id, final T route, final C conn) Creates new
| |
| close | back to summary |
|---|---|
| public abstract void close() Invalidates the pool entry and closes the pooled connection associated with it. | |
| getConnection | back to summary |
|---|---|
| public C getConnection() | |
| getCreated | back to summary |
|---|---|
| public long getCreated() | |
| getExpiry | back to summary |
|---|---|
| public synchronized long getExpiry() | |
| getId | back to summary |
|---|---|
| public String getId() | |
| getRoute | back to summary |
|---|---|
| public T getRoute() | |
| getState | back to summary |
|---|---|
| public Object getState() | |
| getUpdated | back to summary |
|---|---|
| public synchronized long getUpdated() | |
| getValidityDeadline | back to summary |
|---|---|
public long getValidityDeadline()
| |
| getValidUnit | back to summary |
|---|---|
| public long getValidUnit()
Deprecated
| |
| isClosed | back to summary |
|---|---|
| public abstract boolean isClosed() Returns | |
| isExpired | back to summary |
|---|---|
| public synchronized boolean isExpired(final long now) | |
| setState | back to summary |
|---|---|
| public void setState(final Object state) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| updateExpiry | back to summary |
|---|---|
| public synchronized void updateExpiry(final long time, final TimeUnit timeUnit) | |