E - the type of the connections in the pool.public abstract class AbstractConnectionPool<E extends AutoCloseable> extends Object implements ConnectionPool<E>
ConnectionPool interface.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConnectionPool(int size)
Initialize this pool with the specfiied core size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
connectionCount()
Get the current size of this pool.
|
List<E> |
getConnections()
Get a list of connections held by this pool.
|
int |
getSize()
Get the maximum size of this connection pool.
|
boolean |
isEmpty()
Determine whether this pool is empty.
|
Iterator<E> |
iterator() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetConnection, setSizeforEach, spliteratorprotected AbstractConnectionPool(int size)
size - the minimum number of connections in this pool.public boolean isEmpty()
ConnectionPoolisEmpty in interface ConnectionPool<E extends AutoCloseable>true if this pool is empty, false otherwise.public int connectionCount()
ConnectionPoolconnectionCount in interface ConnectionPool<E extends AutoCloseable>public List<E> getConnections()
ConnectionPoolgetConnections in interface ConnectionPool<E extends AutoCloseable>JPPFClientConnection instances.public Iterator<E> iterator()
iterator in interface Iterable<E extends AutoCloseable>public int getSize()
ConnectionPoolgetSize in interface ConnectionPool<E extends AutoCloseable>public void close()
close in interface AutoCloseableCopyright © 2005-2019 JPPF Team.