| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private final Pool | |
| private final PoolParticipant | |
| protected final SizeOfEngine | sizeOfEngine
|
| private final AtomicBoolean |
| Access | Constructor and Description |
|---|---|
| public | AbstractPoolAccessor(Pool
pool to be accessed pool, PoolParticipant accessing participant participant, SizeOfEngine sizeOfEngine)Creates an accessor for the specified participant to access the specified pool. |
| Modifier and Type | Method and Description |
|---|---|
| public final long | add(Object
the key of the element key, Object the value of the element value, Object the element-container object container, boolean true if the pool should accept adding the element, even if it's out of resources force)Implements net. |
| protected abstract long | Returns: how many bytes have been added to the pool or -1 if add failed.number of bytes to add sizeOf, boolean true if the pool should accept adding the element, even if it's out of resources force)Add a specific number of bytes to the pool. |
| public final boolean | canAddWithoutEvicting(Object
the key of the element key, Object the value of the element value, Object the element-container object container)Implements net. |
| protected abstract boolean | Returns: true if there is enough room leftnumber of bytes to test against sizeOf)Check if there is enough room in the pool to add a specific number of bytes without provoking any eviction |
| protected final void | |
| public final void | |
| protected abstract void | |
| public final PoolParticipant | getParticipant()
Implements net. |
| protected final Pool | |
| public long | getPoolOccupancy()
Implements net. |
| public long | getPoolSize()
Implements net. |
| public boolean | hasAbortedSizeOf()
Implements net. |
| public final long | replace(long
the size of the object(s) being replaced currentSize, Object the key of the element key, Object the value of the element value, Object the element-container object container, boolean true if the pool should accept replacing the element, even if it's out of resources force)Implements net. |
| public void | setMaxSize(final long
the value in bytes newValue)Implements net. |
| public final void |
| abortedSizeOf | back to summary |
|---|---|
| private volatile boolean abortedSizeOf | |
| pool | back to summary |
|---|---|
| private final Pool pool | |
| poolParticipant | back to summary |
|---|---|
| private final PoolParticipant poolParticipant | |
| sizeOfEngine | back to summary |
|---|---|
| protected final SizeOfEngine sizeOfEngine
| |
| unlinked | back to summary |
|---|---|
| private final AtomicBoolean unlinked | |
| AbstractPoolAccessor | back to summary |
|---|---|
| public AbstractPoolAccessor(Pool pool, PoolParticipant participant, SizeOfEngine sizeOfEngine) Creates an accessor for the specified participant to access the specified pool.
| |
| add | back to summary |
|---|---|
| public final long add(Object key, Object value, Object container, boolean force) Implements net. Doc from net. Add an element to the pool. | |
| add | back to summary |
|---|---|
| protected abstract long add(long sizeOf, boolean force) throws IllegalArgumentException Add a specific number of bytes to the pool.
| |
| canAddWithoutEvicting | back to summary |
|---|---|
| public final boolean canAddWithoutEvicting(Object key, Object value, Object container) Implements net. Doc from net. Check if there is enough room in the pool to add an element without provoking any eviction | |
| canAddWithoutEvicting | back to summary |
|---|---|
| protected abstract boolean canAddWithoutEvicting(long sizeOf) Check if there is enough room in the pool to add a specific number of bytes without provoking any eviction
| |
| checkLinked | back to summary |
|---|---|
| protected final void checkLinked() throws IllegalStateException Throws
| |
| clear | back to summary |
|---|---|
| public final void clear() Implements net. Doc from net. Free resources used by this accessor. | |
| doClear | back to summary |
|---|---|
| protected abstract void doClear() Free resources used by this accessor.
This method is called by | |
| getParticipant | back to summary |
|---|---|
| public final PoolParticipant getParticipant() Implements net. Doc from net. Return the store that uses this accessor
| |
| getPool | back to summary |
|---|---|
| protected final Pool getPool() Return the pool this accessor is associated with.
| |
| getPoolOccupancy | back to summary |
|---|---|
| public long getPoolOccupancy() Implements net. Doc from net. Returns the occupied size for this pool.
| |
| getPoolSize | back to summary |
|---|---|
| public long getPoolSize() Implements net. Doc from net. Returns the size of this pool.
| |
| hasAbortedSizeOf | back to summary |
|---|---|
| public boolean hasAbortedSizeOf() Implements net. Doc from net. Check if the store may contain elements which the SizeOf engine could not fully size.
| |
| replace | back to summary |
|---|---|
| public final long replace(long currentSize, Object key, Object value, Object container, boolean force) Implements net. Doc from net. Delete a fixed number of bytes from the pool with the given objects.
| |
| setMaxSize | back to summary |
|---|---|
| public void setMaxSize(final long newValue) Implements net. Doc from net. Sets the max size for this pool
| |
| unlink | back to summary |
|---|---|
| public final void unlink() Implements net. Doc from net. unlink this PoolAccessor from its pool. | |