This contains all the logic of a pool except for the actual creation of accessor instances.
| Modifier and Type | Field and Description |
|---|---|
| private final SizeOfEngine | |
| private final PoolEvictor | |
| private volatile long | |
| private final List | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public | AbstractPool(long
the maximum size of the pool, in bytes. maximumPoolSize, PoolEvictor<T extends PoolParticipant> the pool evictor, for cross-store eviction. evictor, SizeOfEngine the default SizeOf engine used by the accessors. defaultSizeOfEngine)Create an AbstractPool instance |
| Modifier and Type | Method and Description |
|---|---|
| public PoolAccessor | createPoolAccessor(PoolParticipant
the participant which will use the created accessor. participant, int maximum depth of the object graph to traverse maxDepth, boolean true if the object traversal should be aborted when the max depth is exceeded abortWhenMaxDepthExceeded)Implements net. |
| public PoolEvictor | getEvictor()
Implements net. |
| public long | |
| public Collection | getPoolAccessors()
Implements net. |
| public long | |
| public void | registerPoolAccessor(PoolAccessor<T extends PoolParticipant>
accessor to be registered accessor)Implements net. |
| public void | removePoolAccessor(PoolAccessor<T extends PoolParticipant>
accessor to be removed accessor)Implements net. |
| public void | setMaxSize(long
the new pool size. newSize)Implements net. |
| defaultSizeOfEngine | back to summary |
|---|---|
| private final SizeOfEngine defaultSizeOfEngine | |
| evictor | back to summary |
|---|---|
| private final PoolEvictor<T extends PoolParticipant> evictor | |
| maximumPoolSize | back to summary |
|---|---|
| private volatile long maximumPoolSize | |
| poolAccessors | back to summary |
|---|---|
| private final List<PoolAccessor<T extends PoolParticipant>> poolAccessors | |
| poolAccessorsView | back to summary |
|---|---|
| private final List<PoolAccessor<T extends PoolParticipant>> poolAccessorsView | |
| AbstractPool | back to summary |
|---|---|
| public AbstractPool(long maximumPoolSize, PoolEvictor<T extends PoolParticipant> evictor, SizeOfEngine defaultSizeOfEngine) Create an AbstractPool instance
| |
| createPoolAccessor | back to summary |
|---|---|
| public PoolAccessor Implements net. Doc from net. Return a PoolAccessor whose consumption is tracked by this pool, using a default SizeOf engine.
| |
| getEvictor | back to summary |
|---|---|
| public PoolEvictor Implements net. Doc from net. Return the pool evictor used by this pool.
| |
| getMaxSize | back to summary |
|---|---|
| public long getMaxSize() Implements net. Doc from net. Return the maximum size of the pool.
| |
| getPoolAccessors | back to summary |
|---|---|
| public Collection Implements net. Doc from net. Return the participants accessing this pool.
| |
| getSize | back to summary |
|---|---|
| public long getSize() Implements net. Doc from net. Return the used size of the pool.
| |
| registerPoolAccessor | back to summary |
|---|---|
| public void registerPoolAccessor(PoolAccessor<T extends PoolParticipant> accessor) Implements net. Doc from net. Register an accessor implementation with this pool.
| |
| removePoolAccessor | back to summary |
|---|---|
| public void removePoolAccessor(PoolAccessor<T extends PoolParticipant> accessor) Implements net. Doc from net. Remove the supplied accessor from this pool.
| |
| setMaxSize | back to summary |
|---|---|
| public void setMaxSize(long newSize) Implements net. Doc from net. Change the maximum size of the pool.
| |