Interface PersistenceStorer<M>
-
- All Superinterfaces:
PersistenceStoring,Storer
- All Known Subinterfaces:
BinaryStorer
- All Known Implementing Classes:
BinaryStorer.Default,BinaryStorer.Eager
public interface PersistenceStorer<M> extends Storer
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfacePersistenceStorer.Creator<M>
-
Method Summary
Modifier and Type Method Description PersistenceStorer<M>ensureCapacity(long desiredCapacity)Ensures that the instance's internal state is prepared for handling an amount of unique instance equal to the passed value.PersistenceStorer<M>initialize()Ensures the storer instance is initialized, i.e.PersistenceStorer<M>initialize(long initialCapacity)Ensures the storer instance is initialized, i.e.PersistenceStorer<M>reinitialize()Enforces the instance to be initialized, discarding any previous state (clearing it) if necessary prior to callingStorer.initialize().PersistenceStorer<M>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, currentCapacity, isEmpty, isInitialized, maximumCapacity, size, skip, skipMapped, skipNulled
-
-
-
-
Method Detail
-
initialize
PersistenceStorer<M> initialize()
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:
initializein interfaceStorer- Returns:
- this.
-
initialize
PersistenceStorer<M> initialize(long initialCapacity)
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 passedinitialCapacityis 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:
initializein interfaceStorer- Returns:
- this.
-
reinitialize
PersistenceStorer<M> reinitialize()
Enforces the instance to be initialized, discarding any previous state (clearing it) if necessary prior to callingStorer.initialize().- Specified by:
reinitializein interfaceStorer- Returns:
- this.
-
reinitialize
PersistenceStorer<M> reinitialize(long initialCapacity)
Enforces the instance to be initialized, discarding any previous state (clearing it) if necessary prior to callingStorer.initialize().- Specified by:
reinitializein interfaceStorer- Returns:
- this.
-
ensureCapacity
PersistenceStorer<M> ensureCapacity(long desiredCapacity)
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:
ensureCapacityin interfaceStorer- Parameters:
desiredCapacity- the amount of unique instances that this instance shall prepare to handle.- Returns:
- this
-
-