| Modifier and Type | Field and Description |
|---|---|
| private final AtomicLong |
| Access | Constructor and Description |
|---|---|
| pack-priv | AtomicPoolAccessor(Pool
pool to be accessed pool, PoolParticipant accessing poolParticipant poolParticipant, SizeOfEngine engine used to size objects sizeOfEngine, long initial size of the poolParticipant currentSize)Creates an atomic pool accessor with the specified properties. |
| Modifier and Type | Method and Description |
|---|---|
| protected long | add(long
number of bytes to add sizeOf, boolean true if the pool should accept adding the element, even if it's out of resources force)Implements abstract net. |
| protected boolean | canAddWithoutEvicting(long
number of bytes to test against sizeOf)Implements abstract net. |
| public long | delete(long
number of bytes sizeOf)Implements net. |
| protected void | doClear()
Implements abstract net. |
| public long | getSize()
Implements net. |
| size | back to summary |
|---|---|
| private final AtomicLong size | |
| AtomicPoolAccessor | back to summary |
|---|---|
| pack-priv AtomicPoolAccessor(Pool pool, PoolParticipant poolParticipant, SizeOfEngine sizeOfEngine, long currentSize) Creates an atomic pool accessor with the specified properties.
| |
| add | back to summary |
|---|---|
| protected long add(long sizeOf, boolean force) throws IllegalArgumentException Implements abstract net. Doc from net. Add a specific number of bytes to the pool.
| |
| canAddWithoutEvicting | back to summary |
|---|---|
| protected boolean canAddWithoutEvicting(long sizeOf) Implements abstract net. Doc from net. Check if there is enough room in the pool to add a specific number of bytes without provoking any eviction
| |
| delete | back to summary |
|---|---|
| public long delete(long sizeOf) throws IllegalArgumentException Implements net. Doc from net. Delete a fixed number of bytes from the pool.
| |
| doClear | back to summary |
|---|---|
| protected void doClear() Implements abstract net. Doc from net. Free resources used by this accessor.
This method is called by | |
| getSize | back to summary |
|---|---|
| public long getSize() Implements net. Doc from net. Return how many bytes this accessor consumes from the pool.
| |