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>
-
Constructor Summary
Constructors Constructor Description Eager()
-
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, ensureCapacity, getObjectRetriever, iterateMergeableEntries, lookupObjectId, lookupOid, maximumCapacity, parentObjectManager, registerGuaranteed, reinitialize, reinitialize, size, skip, skipMapped, skipNulled, store, storeAll, storeAll, synchRebuildStoreItems, synchRebuildStoreItems, synchRegisterObjectId
-
Constructor Details
-
Eager
public Eager()
-
-
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
- Parameters:
instance
- the instance to which the function shall be applied.- Returns:
- the object ID (OID) that is associated with the passed instance.
-
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
-