Interface PersistenceManager<D>
- All Superinterfaces:
ByteOrderTargeting<PersistenceManager<D>>
,Cloneable<PersistenceObjectManager<D>>
,ObjectSwizzling
,PersistenceObjectIdHolder
,PersistenceObjectIdLookup
,PersistenceObjectLookup
,PersistenceObjectManager<D>
,PersistenceRetrieving
,PersistenceSourceSupplier<D>
,PersistenceStoring
,PersistenceSwizzlingLookup
,Persister
- All Known Subinterfaces:
ViewerBinaryPersistenceManager
- All Known Implementing Classes:
PersistenceManager.Default
,ViewerBinaryPersistenceManager.Default
public interface PersistenceManager<D> extends PersistenceObjectManager<D>, PersistenceRetrieving, Persister, PersistenceSourceSupplier<D>, ByteOrderTargeting<PersistenceManager<D>>
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PersistenceManager.Default<D>
Nested classes/interfaces inherited from interface one.microstream.persistence.types.ByteOrderTargeting
ByteOrderTargeting.Mutable<T extends ByteOrderTargeting.Mutable<?>>
-
Method Summary
Methods inherited from interface one.microstream.persistence.types.ByteOrderTargeting
getTargetByteOrder, isByteOrderMismatch
Methods inherited from interface one.microstream.persistence.types.PersistenceObjectIdLookup
lookupObjectId
Methods inherited from interface one.microstream.persistence.types.PersistenceObjectLookup
lookupObject
Methods inherited from interface one.microstream.persistence.types.PersistenceObjectManager
Clone, consolidate, ensureObjectId, ensureObjectId, ensureObjectIdGuaranteedRegister, mergeEntries, registerLocalRegistry
Methods inherited from interface one.microstream.persistence.types.PersistenceRetrieving
collect, get, getObject
Methods inherited from interface one.microstream.persistence.types.PersistenceSourceSupplier
getObject
-
Method Details
-
createLazyStorer
PersistenceStorer createLazyStorer()Description copied from interface:Persister
Creates a newStorer
instance with lazy storing behavior. This means an entity instance encountered while traversing the entity graph is only stored if it is not yet known to the persistence context, i.e. does not have an objectId associated with it in the persistence context'sPersistenceObjectRegistry
.- Specified by:
createLazyStorer
in interfacePersister
- Returns:
- the newly created
Storer
instance.
-
createStorer
PersistenceStorer createStorer()Description copied from interface:Persister
Creates a newStorer
instance with default storing behavior. The default is lazy storing. SeePersister.createLazyStorer()
.- Specified by:
createStorer
in interfacePersister
- Returns:
- the newly created
Storer
instance.
-
createEagerStorer
PersistenceStorer createEagerStorer()Description copied from interface:Persister
Creates a newStorer
instance with eager storing behavior. This means an entity instance encountered while traversing the entity graph is always stored, regardless of if it is already known to the persistence context or not, i.e. does have an objectId associated with it in the persistence context'sPersistenceObjectRegistry
.Note: Eager storing is a dangerous behavior since - depending on the entity graph's referential layout - it can cause the whole entity graph present in the heap to be stored. Therefore, it is stronly advised to instead use lazy storing logic (see
Persister.createLazyStorer()
) or some other kind of limiting storing logic.- Specified by:
createEagerStorer
in interfacePersister
- Returns:
- the newly created
Storer
instance.
-
createStorer
-
createLoader
PersistenceLoader createLoader() -
createRegisterer
PersistenceRegisterer createRegisterer() -
updateMetadata
void updateMetadata(PersistenceTypeDictionary typeDictionary, long highestTypeId, long highestObjectId) -
updateMetadata
-
objectRegistry
PersistenceObjectRegistry objectRegistry() -
typeDictionary
PersistenceTypeDictionary typeDictionary() -
currentObjectId
long currentObjectId()- Specified by:
currentObjectId
in interfacePersistenceObjectIdHolder
- Specified by:
currentObjectId
in interfacePersistenceObjectManager<D>
-
updateCurrentObjectId
- Specified by:
updateCurrentObjectId
in interfacePersistenceObjectIdHolder
- Specified by:
updateCurrentObjectId
in interfacePersistenceObjectManager<D>
-
source
PersistenceSource<D> source()- Specified by:
source
in interfacePersistenceSourceSupplier<D>
-
target
PersistenceTarget<D> target() -
close
void close()Closes all ties to outside resources, if applicable. Typ -
New
static <D> PersistenceManager<D> New(PersistenceObjectRegistry objectRegistering, PersistenceObjectManager<D> objectManager, PersistenceTypeHandlerManager<D> typeHandlerManager, PersistenceContextDispatcher<D> contextDispatcher, PersistenceStorer.Creator<D> storerCreator, PersistenceLoader.Creator<D> loaderCreator, PersistenceRegisterer.Creator registererCreator, Persister persister, PersistenceTarget<D> target, PersistenceSource<D> source, PersistenceStorer.CreationObserver storerObserver, BufferSizeProviderIncremental bufferSizeProvider, ByteOrder targetByteOrder)
-