A Pool implementation that uses a primary pool which overflows to a secondary pool.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Pool. | |
| public int | |
| public boolean | |
| public Pool. | |
| public int | |
| public Stream | |
| public Collection |
| primaryPool | back to summary |
|---|---|
| private final Pool<P> primaryPool | |
| secondaryPool | back to summary |
|---|---|
| private final Pool<P> secondaryPool | |
| CompoundPool | back to summary |
|---|---|
| public CompoundPool(Pool<P> primaryPool, Pool<P> secondaryPool) | |
| acquire | back to summary |
|---|---|
| public Pool. Implements org. Doc from org. Acquires an entry from the pool. Only enabled entries will be returned from this method
and their | |
| getMaxSize | back to summary |
|---|---|
| public int getMaxSize() Implements org.
| |
| isTerminated | back to summary |
|---|---|
| public boolean isTerminated() Implements org.
| |
| reserve | back to summary |
|---|---|
| public Pool. Implements org. Doc from org. Creates a new disabled slot into the pool. The returned entry must ultimately have the | |
| size | back to summary |
|---|---|
| public int size() Implements org.
| |
| stream | back to summary |
|---|---|
| public Stream Implements org. | |
| terminate | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Terminates this All the entries are marked as terminated and cannot be acquired nor released, but only removed. The returned list of all entries may be iterated to perform additional operations on the pooled objects. The pool cannot be used anymore after it is terminated.
| |