E - the type of the connections in the pool.public interface ConnectionPool<E extends AutoCloseable> extends Iterable<E>, AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
int |
connectionCount()
Get the current size of this pool.
|
E |
getConnection()
Get the next connection that is connected and available.
|
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.
|
int |
setSize(int maxSize)
Set the size of this connection pool, starting or stopping connections as needed.
|
forEach, iterator, spliteratorcloseE getConnection()
null otherwise.boolean isEmpty()
true if this pool is empty, false otherwise.int connectionCount()
int getSize()
int setSize(int maxSize)
If any connection to be stopped is currently executing a job, then it will not be stopped.
maxSize - the max size as an int.List<E> getConnections()
JPPFClientConnection instances.Copyright © 2005-2019 JPPF Team.