Class PersistenceStorerCreatorDeactivatable<D>
java.lang.Object
one.microstream.persistence.types.PersistenceStorerCreatorDeactivatable<D>
- All Implemented Interfaces:
PersistenceStorer.Creator<D>
public class PersistenceStorerCreatorDeactivatable<D> extends Object implements PersistenceStorer.Creator<D>
PeristenceStorer creator that creates
PersistenceStorerDeactivatable
instances.-
Constructor Summary
Constructors Constructor Description PersistenceStorerCreatorDeactivatable(PersistenceStorer.Creator<D> creator, PersistenceStorerDeactivatableRegistry storerModeController)
-
Method Summary
Modifier and Type Method Description PersistenceStorer
createEagerStorer(PersistenceTypeHandlerManager<D> typeManager, PersistenceObjectManager<D> objectManager, ObjectSwizzling objectRetriever, PersistenceTarget<D> target, BufferSizeProviderIncremental bufferSizeProvider)
Creates aPersistenceStorer
instance with a storing logic that stores every instance that is encountered during the traversal of the entity graph once.
Warning: This means that every (persistable) reference is traversed and every reachable instance is stored.PersistenceStorer
createLazyStorer(PersistenceTypeHandlerManager<D> typeManager, PersistenceObjectManager<D> objectManager, ObjectSwizzling objectRetriever, PersistenceTarget<D> target, BufferSizeProviderIncremental bufferSizeProvider)
Creates aPersistenceStorer
instance with a storing logic that stores instances that are encountered during the traversal of the entity graph that "require" to be stored.static <D> PersistenceStorerCreatorDeactivatable<D>
New(PersistenceFoundation<D,?> connectionFoundation, PersistenceStorerDeactivatableRegistry storerRegistry)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface one.microstream.persistence.types.PersistenceStorer.Creator
createStorer
-
Constructor Details
-
PersistenceStorerCreatorDeactivatable
public PersistenceStorerCreatorDeactivatable(PersistenceStorer.Creator<D> creator, PersistenceStorerDeactivatableRegistry storerModeController)
-
-
Method Details
-
New
public static <D> PersistenceStorerCreatorDeactivatable<D> New(PersistenceFoundation<D,?> connectionFoundation, PersistenceStorerDeactivatableRegistry storerRegistry) -
createLazyStorer
public PersistenceStorer createLazyStorer(PersistenceTypeHandlerManager<D> typeManager, PersistenceObjectManager<D> objectManager, ObjectSwizzling objectRetriever, PersistenceTarget<D> target, BufferSizeProviderIncremental bufferSizeProvider)Description copied from interface:PersistenceStorer.Creator
Creates aPersistenceStorer
instance with a storing logic that stores instances that are encountered during the traversal of the entity graph that "require" to be stored. The actual meaning of being "required" depends on the implementation. An example for being "required" is not having an instance registered in the global object registry and associated an biunique OID.- Specified by:
createLazyStorer
in interfacePersistenceStorer.Creator<D>
- Parameters:
typeManager
- the provided type managerobjectManager
- the provided object managerobjectRetriever
- the provided object retrievertarget
- the provided persistence targetbufferSizeProvider
- the provided buffer size provider- Returns:
- a new lazy storer
-
createEagerStorer
public PersistenceStorer createEagerStorer(PersistenceTypeHandlerManager<D> typeManager, PersistenceObjectManager<D> objectManager, ObjectSwizzling objectRetriever, PersistenceTarget<D> target, BufferSizeProviderIncremental bufferSizeProvider)Description copied from interface:PersistenceStorer.Creator
Creates aPersistenceStorer
instance with a storing logic that stores every instance that is encountered during the traversal of the entity graph once.
Warning: This means that every (persistable) reference is traversed and every reachable instance is stored. Depending on the used data model, this can mean that the whole entity graph of an application is traversed and stored. This MIGHT be reasonable for very tiny applications, where storing simply means to start at the root entity and indiscriminately store every entity there is. Apart from this (rather academic) case, a storer with this logic should only be used for a confined entity sub-graph that has no reference "escaping" to the remaning entities.- Specified by:
createEagerStorer
in interfacePersistenceStorer.Creator<D>
- Parameters:
typeManager
- the provided type managerobjectManager
- the provided object managerobjectRetriever
- the provided object retrievertarget
- the provided persistence targetbufferSizeProvider
- the provided buffer size provider- Returns:
- a new eager storer
-