Class EmbeddedStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- All Implemented Interfaces:
Unpersistable
,EmbeddedStorageFoundation<F>
,StorageFoundation<F>
,InstanceDispatcher
- Enclosing interface:
- EmbeddedStorageFoundation<F extends EmbeddedStorageFoundation<?>>
public static class EmbeddedStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>> extends StorageFoundation.Default<F> implements EmbeddedStorageFoundation<F>
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.storage.types.EmbeddedStorageFoundation
EmbeddedStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
Nested classes/interfaces inherited from interface one.microstream.util.InstanceDispatcher
InstanceDispatcher.Default
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageFoundation
StorageFoundation.Default<F extends StorageFoundation.Default<?>>
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
Methods inherited from class one.microstream.storage.types.StorageFoundation.Default
createStorageSystem, getBackupThreadProvider, getChannelCreator, getChannelThreadProvider, getConfiguration, getDataChunkValidatorProvider, getDataChunkValidatorProvider2, getDataFileValidatorCreator, getEntityDataIteratorProvider, getEntityDataValidatorCreator, getEntityMarkMonitorCreator, getEventLogger, getExceptionHandler, getGCZombieOidHandler, getHousekeepingBroker, getInitialDataFileNumberProvider, getLockFileManagerCreator, getLockFileManagerThreadProvider, getLockFileSetup, getLockFileSetupProvider, getObjectIdRangeEvaluator, getOidMarkQueueCreator, getOperationControllerCreator, getProcessIdentityProvider, getRequestAcceptorCreator, getRequestTaskCreator, getRootOidSelectorProvider, getRootTypeIdProvider, getTaskBrokerCreator, getThreadNameProvider, getThreadProvider, getTimestampProvider, getTypeDictionary, getWriteController, getWriterProvider, housekeepingBroker, isByteOrderMismatch, setBackupThreadProvider, setChannelThreadProvider, setDataChunkValidatorProvider2, setDataFileValidatorCreator, setEntityDataIteratorProvider, setEntityDataValidatorCreator, setEntityMarkMonitorCreator, setEventLogger, setExceptionHandler, setGCZombieOidHandler, setHousekeepingBroker, setInitialDataFileNumberProvider, setLockFileManagerCreator, setLockFileManagerThreadProvider, setLockFileSetup, setLockFileSetupProvider, setObjectIdRangeEvaluator, setOidMarkQueueCreator, setOperationControllerCreator, setProcessIdentityProvider, setRootOidSelectorProvider, setThreadNameProvider, setThreadProvider, setWriterProvider, writeController
Methods inherited from class one.microstream.util.InstanceDispatcher.Default
getInstanceDispatcherLogic, setInstanceDispatcherLogic
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface one.microstream.storage.types.EmbeddedStorageFoundation
createEmbeddedStorageManager, start, start
Methods inherited from interface one.microstream.storage.types.StorageFoundation
createStorageSystem, getBackupThreadProvider, getChannelCreator, getChannelThreadProvider, getConfiguration, getDataChunkValidatorProvider, getDataChunkValidatorProvider2, getDataFileValidatorCreator, getEntityDataIteratorProvider, getEntityDataValidatorCreator, getEntityMarkMonitorCreator, getEventLogger, getExceptionHandler, getGCZombieOidHandler, getHousekeepingBroker, getInitialDataFileNumberProvider, getLockFileManagerCreator, getLockFileManagerThreadProvider, getLockFileSetup, getLockFileSetupProvider, getObjectIdRangeEvaluator, getOidMarkQueueCreator, getOperationControllerCreator, getProcessIdentityProvider, getRequestAcceptorCreator, getRequestTaskCreator, getRootOidSelectorProvider, getRootTypeIdProvider, getTaskBrokerCreator, getThreadNameProvider, getThreadProvider, getTimestampProvider, getTypeDictionary, getWriteController, getWriterProvider, housekeepingBroker, setBackupThreadProvider, setChannelThreadProvider, setDataChunkValidatorProvider2, setDataFileValidatorCreator, setEntityDataIteratorProvider, setEntityDataValidatorCreator, setEntityMarkMonitorCreator, setEventLogger, setExceptionHandler, setGCZombieOidHandler, setHousekeepingBroker, setInitialDataFileNumberProvider, setLockFileManagerCreator, setLockFileManagerThreadProvider, setLockFileSetup, setLockFileSetupProvider, setObjectIdRangeEvaluator, setOidMarkQueueCreator, setOperationControllerCreator, setProcessIdentityProvider, setRootOidSelectorProvider, setThreadNameProvider, setThreadProvider, setWriterProvider, writeController
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
onConnectionFoundation
Description copied from interface:EmbeddedStorageFoundation
Executes the passed logic on theEmbeddedStorageConnectionFoundation
instance provided byEmbeddedStorageFoundation.getConnectionFoundation()
.This is a mere utility method to allow more concise syntax and multi-layered method chaining.
- Specified by:
onConnectionFoundation
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
logic
- the logic to be executed.- Returns:
- this to allow method chaining.
-
onThis
Description copied from interface:EmbeddedStorageFoundation
Executes the passed logic on this.This is a mere utility method to allow more concise syntax and multi-layered method chaining.
- Specified by:
onThis
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
logic
- the logic to be executed.- Returns:
- this to allow method chaining.
-
setRoot
Description copied from interface:EmbeddedStorageFoundation
Registers the passed root instance as the root instance at theEmbeddedStorageConnectionFoundation
instance provided byEmbeddedStorageFoundation.getConnectionFoundation()
.
UseEmbeddedStorageFoundation.setRootSupplier(Supplier)
for a more dynamic approach, i.e. if the actual root instance must be created after setting up and creating theEmbeddedStorageManager
.- Specified by:
setRoot
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
root
- the instance to be used as the persistent entity graph's root instance.- Returns:
- this to allow method chaining.
- See Also:
EmbeddedStorageFoundation.setRootSupplier(Supplier)
,EmbeddedStorageFoundation.setRootResolverProvider(PersistenceRootResolverProvider)
,PersistenceFoundation.setRootResolverProvider(PersistenceRootResolverProvider)
-
setRootSupplier
Description copied from interface:EmbeddedStorageFoundation
Registers the passed rootSupplierSupplier
as the root instance supplier at thePersistenceRootResolverProvider
instance provided byPersistenceFoundation.getRootResolverProvider()
of theEmbeddedStorageConnectionFoundation
instance provided byEmbeddedStorageFoundation.getConnectionFoundation()
.This means this method is merely an alias for
.onConnectionFoundation(f -> f.getRootResolverProvider().registerCustomRootSupplier(rootSupplier);
) }Note that replacing the
PersistenceRootResolverProvider
instance, for example via #setRootResolverProvider, will nullify the changes made via this method.The actual root instance will be queried during startup, not before.
This technique allows a more dynamic approach thanEmbeddedStorageFoundation.setRoot(Object)
, i.e. if the actual root instance must be created after setting up and creating theEmbeddedStorageManager
.- Specified by:
setRootSupplier
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
rootSupplier
- the supplying logic to obtain the instance to be used during startup as the persistent entity graph's root instance.- Returns:
- this to allow method chaining.
- See Also:
EmbeddedStorageManager.start()
,EmbeddedStorageFoundation.setRoot(Object)
,EmbeddedStorageFoundation.setRootResolverProvider(PersistenceRootResolverProvider)
,PersistenceFoundation.setRootResolverProvider(PersistenceRootResolverProvider)
-
setRootResolverProvider
Description copied from interface:EmbeddedStorageFoundation
Alias for.onConnectionFoundation(f -> f.setRootResolverProvider(rootResolverProvider);
) }PersistenceRootResolverProvider
instance to be used in the internalEmbeddedStorageConnectionFoundation
.- Specified by:
setRootResolverProvider
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
rootResolverProvider
- thePersistenceRootResolverProvider
to be set.- Returns:
- this to allow method chaining.
- See Also:
EmbeddedStorageFoundation.setRootSupplier(Supplier)
,PersistenceFoundation.setRootResolverProvider(PersistenceRootResolverProvider)
-
getConnectionFoundation
Description copied from interface:EmbeddedStorageFoundation
Returns the currently setStorageConfiguration
instance.If no instance is set and the implementation deems an instance of this type mandatory for the successful executon of
EmbeddedStorageFoundation.createEmbeddedStorageManager()
, a suitable instance is created via an internal default creation logic and then set as the current. If the implementation has not sufficient logic and/or data to create a default instance, aMissingFoundationPartException
is thrown.- Specified by:
getConnectionFoundation
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Returns:
- the currently set instance, potentially created on-demand if required.
-
getDatabases
Description copied from interface:EmbeddedStorageFoundation
The register ofDatabase
s whereStorageManager
instances created by this foundation instance will be registered. By default, this is the global singleton returned byDatabases.get()
, but it can be set to any arbitraryDatabases
instances by callingEmbeddedStorageFoundation.setDatabases(Databases)
.- Specified by:
getDatabases
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Returns:
- the
Databases
instance used to register newly createdStorageManager
instances. - See Also:
EmbeddedStorageFoundation.setDatabases(Databases)
,EmbeddedStorageFoundation.setDataBaseName(String)
,EmbeddedStorageFoundation.getDataBaseName()
-
getDataBaseName
Description copied from interface:EmbeddedStorageFoundation
A name uniquely identifying theDatabase
whereStorageManager
instances created by this foundation will belong to. If no arbitrary name has been set by callingEmbeddedStorageFoundation.setDataBaseName(String)
, a generic name is derived using the storage location.- Specified by:
getDataBaseName
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Returns:
- a name uniquely identifying the
Database
to be used. - See Also:
EmbeddedStorageFoundation.setDataBaseName(String)
,EmbeddedStorageFoundation.setDatabases(Databases)
,EmbeddedStorageFoundation.getDatabases()
-
getRootResolverProvider
Description copied from interface:EmbeddedStorageFoundation
Returns the internalEmbeddedStorageConnectionFoundation
instance'sPersistenceRootResolverProvider
instance. If none is present so far, a new default one is created.- Specified by:
getRootResolverProvider
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Returns:
- the
PersistenceRootResolverProvider
instance to be used.
-
getTypeEvaluatorPersistable
- Specified by:
getTypeEvaluatorPersistable
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
-
setConfiguration
Description copied from interface:StorageFoundation
Sets theStorageConfiguration
instance to be used for the assembly.- Specified by:
setConfiguration
in interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Overrides:
setConfiguration
in classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
configuration
- the instance to be used.- Returns:
- this to allow method chaining.
-
setRequestAcceptorCreator
Description copied from interface:StorageFoundation
Sets theStorageRequestAcceptor.Creator
instance to be used for the assembly.- Specified by:
setRequestAcceptorCreator
in interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Overrides:
setRequestAcceptorCreator
in classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
requestAcceptorCreator
- the instance to be used.- Returns:
- this to allow method chaining.
-
setTaskBrokerCreator
Description copied from interface:StorageFoundation
Sets theStorageTaskBroker.Creator
instance to be used for the assembly.- Specified by:
setTaskBrokerCreator
in interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Overrides:
setTaskBrokerCreator
in classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
taskBrokerCreator
- the instance to be used.- Returns:
- this to allow method chaining.
-
setDataChunkValidatorProvider
public F setDataChunkValidatorProvider(StorageDataChunkValidator.Provider dataChunkValidatorProvider)Description copied from interface:StorageFoundation
Sets theStorageDataChunkValidator.Provider
instance to be used for the assembly.- Specified by:
setDataChunkValidatorProvider
in interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Overrides:
setDataChunkValidatorProvider
in classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
dataChunkValidatorProvider
- the instance to be used.- Returns:
- this to allow method chaining.
-
setChannelCreator
Description copied from interface:StorageFoundation
Sets theStorageChannelsCreator
instance to be used for the assembly.- Specified by:
setChannelCreator
in interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Overrides:
setChannelCreator
in classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
channelCreator
- the instance to be used.- Returns:
- this to allow method chaining.
-
setTaskCreator
Description copied from interface:StorageFoundation
Sets theStorageRequestTaskCreator
instance to be used for the assembly.- Specified by:
setTaskCreator
in interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Overrides:
setTaskCreator
in classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
taskCreator
- the instance to be used.- Returns:
- this to allow method chaining.
-
setTypeDictionary
Description copied from interface:StorageFoundation
Sets theStorageTypeDictionary
instance to be used for the assembly.- Specified by:
setTypeDictionary
in interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Overrides:
setTypeDictionary
in classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
typeDictionary
- the instance to be used.- Returns:
- this to allow method chaining.
-
setRootTypeIdProvider
Description copied from interface:StorageFoundation
Sets theStorageRootTypeIdProvider
instance to be used for the assembly.- Specified by:
setRootTypeIdProvider
in interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Overrides:
setRootTypeIdProvider
in classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
rootTypeIdProvider
- the instance to be used.- Returns:
- this to allow method chaining.
-
setConnectionFoundation
Description copied from interface:EmbeddedStorageFoundation
Sets theEmbeddedStorageConnectionFoundation
instance to be used for the assembly.- Specified by:
setConnectionFoundation
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
connectionFoundation
- the instance to be used.- Returns:
- this to allow method chaining.
-
setDatabases
Description copied from interface:EmbeddedStorageFoundation
Sets theDatabases
instance to be used to register newly createdStorageManager
instances.
Also see the description inEmbeddedStorageFoundation.getDatabases()
.- Specified by:
setDatabases
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
databases
- theDatabases
instance used to register newly createdStorageManager
instances.- Returns:
- this to allow method chaining.
- See Also:
EmbeddedStorageFoundation.getDatabases()
,EmbeddedStorageFoundation.getDataBaseName()
,EmbeddedStorageFoundation.setDataBaseName(String)
-
setDataBaseName
Description copied from interface:EmbeddedStorageFoundation
Sets the name uniquely identifying theDatabase
to be used.
Also see the description inEmbeddedStorageFoundation.getDataBaseName()
.- Specified by:
setDataBaseName
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
dataBaseName
- the name of theDatabase
to be used- Returns:
- this to allow method chaining.
-
setRefactoringMappingProvider
public F setRefactoringMappingProvider(PersistenceRefactoringMappingProvider refactoringMappingProvider)Description copied from interface:EmbeddedStorageFoundation
Sets the passedPersistenceRefactoringMappingProvider
instance to theEmbeddedStorageConnectionFoundation
instance provided byEmbeddedStorageFoundation.getConnectionFoundation()
.- Specified by:
setRefactoringMappingProvider
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
refactoringMappingProvider
- the instance to be used.- Returns:
- this to allow method chaining.
- See Also:
PersistenceFoundation.setRefactoringMappingProvider(PersistenceRefactoringMappingProvider)
-
setTimestampProvider
Description copied from interface:StorageFoundation
Sets theStorageTimestampProvider
instance to be used for the assembly.- Specified by:
setTimestampProvider
in interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Overrides:
setTimestampProvider
in classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
timestampProvider
- the instance to be used.- Returns:
- this to allow method chaining.
-
setTypeEvaluatorPersistable
- Specified by:
setTypeEvaluatorPersistable
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
-
setWriteController
- Specified by:
setWriteController
in interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Overrides:
setWriteController
in classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
-
executeTypeHandlerRegistration
public F executeTypeHandlerRegistration(PersistenceTypeHandlerRegistration<Binary> typeHandlerRegistration)Description copied from interface:EmbeddedStorageFoundation
Convenience method forthis.getConnectionFoundation().executeTypeHandlerRegistration(typeHandlerRegistration)
.See
PersistenceFoundation.executeTypeHandlerRegistration(PersistenceTypeHandlerRegistration)
for details.- Specified by:
executeTypeHandlerRegistration
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
typeHandlerRegistration
- thePersistenceTypeHandlerRegistration
to be executed.- Returns:
- this to allow method chaining.
-
registerTypeHandler
- Specified by:
registerTypeHandler
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
-
registerTypeHandlers
- Specified by:
registerTypeHandlers
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
-
createEmbeddedStorageManager
Description copied from interface:EmbeddedStorageFoundation
Creates and returns a newEmbeddedStorageManager
instance by using the current state of all registered logic part instances and by on-demand creating missing ones via a default logic.If the passed explicitRoot is null, a default root instance will be created, see
StorageManager.defaultRoot()
.The returned
EmbeddedStorageManager
instance will NOT yet be started.- Specified by:
createEmbeddedStorageManager
in interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>
- Parameters:
root
- the instance to be used as the persistent entity graph's root instance.- Returns:
- a new
EmbeddedStorageManager
instance. - See Also:
EmbeddedStorageFoundation.createEmbeddedStorageManager()
,EmbeddedStorageFoundation.start()
,EmbeddedStorageFoundation.start(Object)
-