| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final boolean | |
| private final int | |
| private final Map | |
| private final ReentrantLock | |
| private final int | |
| private final int | |
| private static final ReferenceQueue | |
| private static final Collection |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private long | |
| private void | |
| private void | |
| public void | expire(long
connections idle before 'threshold' should be closed
and removed. threshold)Goes through the connections in this Pool and expires ones that have been idle before 'threshold'. |
| private static void | |
| private Connections | |
| private PooledConnection | getOrCreatePooledConnection(PooledConnectionFactory factory, Connections conns, long start, long timeout)
|
| public PooledConnection | Returns: a pooled connectionidentity of the connection to get id, long the number of milliseconds to wait before giving up timeout, PooledConnectionFactory the factory to use for creating the connection if
creation is necessary factory)Gets a pooled connection for id. The pooled connection might be newly created, as governed by the maxSize and prefSize settings. |
| public void | |
| public String |
| debug | back to summary |
|---|---|
| pack-priv static final boolean debug | |
| initSize | back to summary |
|---|---|
| private final int initSize | |
| map | back to summary |
|---|---|
| private final Map<Object, ConnectionsRef> map | |
| mapLock | back to summary |
|---|---|
| private final ReentrantLock mapLock | |
| maxSize | back to summary |
|---|---|
| private final int maxSize | |
| prefSize | back to summary |
|---|---|
| private final int prefSize | |
| queue | back to summary |
|---|---|
| private static final ReferenceQueue<ConnectionsRef> queue | |
| weakRefs | back to summary |
|---|---|
| private static final Collection<Reference<ConnectionsRef>> weakRefs | |
| Pool | back to summary |
|---|---|
| public Pool(int initSize, int prefSize, int maxSize) | |
| checkRemaining | back to summary |
|---|---|
| private long checkRemaining(long start, long timeout) throws CommunicationException | |
| d | back to summary |
|---|---|
| private void d(String msg, int i) | |
| d | back to summary |
|---|---|
| private void d(String msg, Object obj) | |
| expire | back to summary |
|---|---|
| public void expire(long threshold) Goes through the connections in this Pool and expires ones that have been idle before 'threshold'. An expired connection is closed and then removed from the pool (removePooledConnection() will eventually be called, and the list of pools itself removed if it becomes empty).
| |
| expungeStaleConnections | back to summary |
|---|---|
| private static void expungeStaleConnections() | |
| getOrCreateConnections | back to summary |
|---|---|
| private Connections getOrCreateConnections(PooledConnectionFactory factory, Object id) throws NamingException | |
| getOrCreatePooledConnection | back to summary |
|---|---|
| private PooledConnection getOrCreatePooledConnection(PooledConnectionFactory factory, Connections conns, long start, long timeout) throws NamingException | |
| getPooledConnection | back to summary |
|---|---|
| public PooledConnection getPooledConnection(Object id, long timeout, PooledConnectionFactory factory) throws NamingException Gets a pooled connection for id. The pooled connection might be newly created, as governed by the maxSize and prefSize settings. If a pooled connection is unavailable and cannot be created due to the maxSize constraint, this call blocks until the constraint is removed or until 'timeout' ms has elapsed.
| |
| showStats | back to summary |
|---|---|
| public void showStats(PrintStream out) | |
| 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- | |