Interface BinaryStorer
-
- All Superinterfaces:
PersistenceStorer<Binary>
,PersistenceStoring
,Storer
- All Known Implementing Classes:
BinaryStorer.Default
,BinaryStorer.Eager
public interface BinaryStorer extends PersistenceStorer<Binary>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
BinaryStorer.Creator
static class
BinaryStorer.Default
Default implementation that stores referenced instances only if required (i.e.static class
BinaryStorer.Eager
Identical toBinaryStorer.Default
, but stores every referenced instance eagerly.
For a more differentiated solution between the two simple, but extreme strategies, seePersistenceEagerStoringFieldEvaluator
.static class
BinaryStorer.Item
-
Method Summary
Modifier and Type Method Description static BinaryStorer.Creator
Creator(_intReference channelCountProvider, boolean switchByteOrder)
long
currentCapacity()
Returns the internal state's value significant for its capacity of unique instances.PersistenceStorer<Binary>
ensureCapacity(long desiredCapacity)
Ensures that the instance's internal state is prepared for handling an amount of unique instance equal to the passed value.BinaryStorer
initialize()
Ensures the storer instance is initialized, i.e.BinaryStorer
initialize(long initialCapacity)
Ensures the storer instance is initialized, i.e.long
maximumCapacity()
The maximum value thatStorer.currentCapacity()
can reach.PersistenceStorer<Binary>
reinitialize()
Enforces the instance to be initialized, discarding any previous state (clearing it) if necessary prior to callingStorer.initialize()
.PersistenceStorer<Binary>
reinitialize(long initialCapacity)
Enforces the instance to be initialized, discarding any previous state (clearing it) if necessary prior to callingStorer.initialize()
.-
Methods inherited from interface one.microstream.persistence.types.PersistenceStoring
store, storeAll, storeAll, storeSelfStoring
-
Methods inherited from interface one.microstream.persistence.types.Storer
clear, commit, isEmpty, isInitialized, size, skip, skipMapped, skipNulled
-
-
-
-
Method Detail
-
initialize
BinaryStorer initialize()
Description copied from interface:PersistenceStorer
Ensures the storer instance is initialized, i.e. ready to perform storing. This method is idempotent. For a forced (re)initialization, seeStorer.reinitialize()
.- Specified by:
initialize
in interfacePersistenceStorer<Binary>
- Specified by:
initialize
in interfaceStorer
- Returns:
- this.
-
initialize
BinaryStorer initialize(long initialCapacity)
Description copied from interface:PersistenceStorer
Ensures the storer instance is initialized, i.e. ready to perform storing. If the storer instance needs to be initialized as a consequence of this call, the passedinitialCapacity
is considered as an estimate for the number of unique instances to be handled until the next commit. This method is idempotent, meaning if this instance is already initialized, the passed value might not have any effect. For a forced (re)initialization, seeStorer.reinitialize(long)
.- Specified by:
initialize
in interfacePersistenceStorer<Binary>
- Specified by:
initialize
in interfaceStorer
- Returns:
- this.
-
reinitialize
PersistenceStorer<Binary> reinitialize()
Description copied from interface:PersistenceStorer
Enforces the instance to be initialized, discarding any previous state (clearing it) if necessary prior to callingStorer.initialize()
.- Specified by:
reinitialize
in interfacePersistenceStorer<Binary>
- Specified by:
reinitialize
in interfaceStorer
- Returns:
- this.
-
reinitialize
PersistenceStorer<Binary> reinitialize(long initialCapacity)
Description copied from interface:PersistenceStorer
Enforces the instance to be initialized, discarding any previous state (clearing it) if necessary prior to callingStorer.initialize()
.- Specified by:
reinitialize
in interfacePersistenceStorer<Binary>
- Specified by:
reinitialize
in interfaceStorer
- Returns:
- this.
-
ensureCapacity
PersistenceStorer<Binary> ensureCapacity(long desiredCapacity)
Description copied from interface:PersistenceStorer
Ensures that the instance's internal state is prepared for handling an amount of unique instance equal to the passed value. Note that is explicitly does not have to mean that the instance's internal state actually reserves as much space, only makes a best effort to prepare for that amount. Example: an internal hash table's hash length might still remain at 2^30, despite the passed value being much higher.- Specified by:
ensureCapacity
in interfacePersistenceStorer<Binary>
- Specified by:
ensureCapacity
in interfaceStorer
- Parameters:
desiredCapacity
- the amount of unique instances that this instance shall prepare to handle.- Returns:
- this
-
currentCapacity
long currentCapacity()
Description copied from interface:Storer
Returns the internal state's value significant for its capacity of unique instances. Note that the exact meaning of this value is implementation dependant, e.g. it might just be a hash table's length, while the actual amount of unique instances that can be handled by that hash table might be much higher (infinite).- Specified by:
currentCapacity
in interfaceStorer
- Returns:
- the current implementation-specific "capacity" value.
-
maximumCapacity
long maximumCapacity()
Description copied from interface:Storer
The maximum value thatStorer.currentCapacity()
can reach. For more explanation on the exact meaning of the capacity, see there.- Specified by:
maximumCapacity
in interfaceStorer
- Returns:
- the maximum of the implementation-specific "capacity" value.
-
Creator
static BinaryStorer.Creator Creator(_intReference channelCountProvider, boolean switchByteOrder)
-
-