public interface CapacityExtendable extends CapacityCarrying
| Modifier and Type | Method and Description |
|---|---|
long |
currentCapacity()
Returns the current amount of elements this instance can hold before a storage rebuild becomes necessary.
|
default long |
currentFreeCapacity() |
CapacityExtendable |
ensureCapacity(long minimalCapacity) |
CapacityExtendable |
ensureFreeCapacity(long minimalFreeCapacity)
Ensures that the next minimalFreeCapacity elements can be actually added in a fast way,
meaning for example no internal storage rebuild will be necessary.
|
isFull, maximumCapacity, remainingCapacityCapacityExtendable ensureCapacity(long minimalCapacity)
CapacityExtendable ensureFreeCapacity(long minimalFreeCapacity)
minimalFreeCapacity - the capacity to ensurelong currentCapacity()
For carrier implementations that don't have a concept of storage rebuilding (like linked list for example)
this method returns the same value as CapacityCarrying.maximumCapacity().
default long currentFreeCapacity()
Copyright © 2022 MicroStream Software. All rights reserved.