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.ItemNested 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> longapply(T instance)The "natural" way of handling an instance as defined by the implementation.<T> voidregisterEagerOptional(long objectId, T instance, PersistenceTypeHandler<Binary,T> optionalHandler)<T> voidregisterLazyOptional(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:PersistenceStoreHandlerThe "natural" way of handling an instance as defined by the implementation.- Specified by:
applyin interfacePersistenceFunction- Specified by:
applyin interfacePersistenceStoreHandler<Binary>- Overrides:
applyin 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:
registerLazyOptionalin interfacePersistenceObjectIdRequestor<Binary>- Overrides:
registerLazyOptionalin classBinaryStorer.Default
-
registerEagerOptional
public <T> void registerEagerOptional(long objectId, T instance, PersistenceTypeHandler<Binary,T> optionalHandler)- Specified by:
registerEagerOptionalin interfacePersistenceObjectIdRequestor<Binary>- Overrides:
registerEagerOptionalin classBinaryStorer.Default
-