Class BinaryStorer.Eager
java.lang.Object
one.microstream.persistence.binary.types.BinaryStorer.Default
one.microstream.persistence.binary.types.BinaryStorer.Eager
- All Implemented Interfaces:
BinaryStorer
,PersistenceFunction
,PersistenceLocalObjectIdRegistry<Binary>
,PersistenceObjectIdRequestor<Binary>
,PersistenceStoreHandler<Binary>
,PersistenceStorer
,PersistenceStoring
,Storer
- Enclosing interface:
- BinaryStorer
public static final class BinaryStorer.Eager extends BinaryStorer.Default
Identical to
For a more differentiated solution between the two simple, but extreme strategies, see
BinaryStorer.Default
, but stores every referenced instance eagerly.For a more differentiated solution between the two simple, but extreme strategies, see
PersistenceEagerStoringFieldEvaluator
.-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.persistence.binary.types.BinaryStorer
BinaryStorer.Creator, BinaryStorer.Default, BinaryStorer.Eager, BinaryStorer.Item
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceObjectIdRequestor
PersistenceObjectIdRequestor.NoOp<D>
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceStorer
PersistenceStorer.CreationObserver
-
Method Summary
Modifier and Type Method Description <T> long
apply(T instance)
The "natural" way of handling an instance as defined by the implementation.<T> void
registerEagerOptional(long objectId, T instance, PersistenceTypeHandler<Binary,T> optionalHandler)
<T> void
registerLazyOptional(long objectId, T instance, PersistenceTypeHandler<Binary,T> optionalHandler)
Methods inherited from class one.microstream.persistence.binary.types.BinaryStorer.Default
apply, applyEager, applyEager, clear, commit, currentCapacity, defaultSlotSize, ensureCapacity, getObjectRetriever, internalInitialize, iterateMergeableEntries, lookupObjectId, lookupOid, maximumCapacity, parentObjectManager, register, registerGuaranteed, registerGuaranteed, reinitialize, reinitialize, size, skip, skipMapped, skipNulled, store, storeAll, storeAll, storeGraph, storeItem, synchComplete, synchLookupChunk, synchRebuildStoreItems, synchRebuildStoreItems, synchRegisterObjectId
-
Method Details
-
apply
public final <T> long apply(T instance)Description copied from interface:PersistenceStoreHandler
The "natural" way of handling an instance as defined by the implementation.- Specified by:
apply
in interfacePersistenceFunction
- Specified by:
apply
in interfacePersistenceStoreHandler<Binary>
- Overrides:
apply
in classBinaryStorer.Default
- Type Parameters:
T
- the type of the instance- Parameters:
instance
- the instance to store- Returns:
- the assigned object id
-
registerLazyOptional
public <T> void registerLazyOptional(long objectId, T instance, PersistenceTypeHandler<Binary,T> optionalHandler)- Specified by:
registerLazyOptional
in interfacePersistenceObjectIdRequestor<Binary>
- Overrides:
registerLazyOptional
in classBinaryStorer.Default
-
registerEagerOptional
public <T> void registerEagerOptional(long objectId, T instance, PersistenceTypeHandler<Binary,T> optionalHandler)- Specified by:
registerEagerOptional
in interfacePersistenceObjectIdRequestor<Binary>
- Overrides:
registerEagerOptional
in classBinaryStorer.Default
-