Class EmbeddedStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>
- java.lang.Object
-
- one.microstream.util.InstanceDispatcher.Default
-
- one.microstream.storage.types.StorageFoundation.Default<F>
-
- one.microstream.storage.types.EmbeddedStorageFoundation.Default<F>
-
- 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, getInitialDataFileNumberProvider, getLockFileManagerCreator, getLockFileManagerThreadProvider, getLockFileSetup, getLockFileSetupProvider, getObjectIdRangeEvaluator, getOidMarkQueueCreator, getOperationControllerCreator, getProcessIdentityProvider, getReaderProvider, getRequestAcceptorCreator, getRequestTaskCreator, getRootOidSelectorProvider, getRootTypeIdProvider, getTaskBrokerCreator, getThreadNameProvider, getThreadProvider, getTimestampProvider, getTypeDictionary, getWriterProvider, isByteOrderMismatch, setBackupThreadProvider, setChannelThreadProvider, setDataChunkValidatorProvider2, setDataFileValidatorCreator, setEntityDataIteratorProvider, setEntityDataValidatorCreator, setEntityMarkMonitorCreator, setEventLogger, setExceptionHandler, setGCZombieOidHandler, setInitialDataFileNumberProvider, setLockFileManagerCreator, setLockFileManagerThreadProvider, setLockFileSetup, setLockFileSetupProvider, setObjectIdRangeEvaluator, setOidMarkQueueCreator, setOperationControllerCreator, setProcessIdentityProvider, setReaderProvider, setRootOidSelectorProvider, setThreadNameProvider, setThreadProvider, setWriterProvider
-
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, getInitialDataFileNumberProvider, getLockFileManagerCreator, getLockFileManagerThreadProvider, getLockFileSetup, getLockFileSetupProvider, getObjectIdRangeEvaluator, getOidMarkQueueCreator, getOperationControllerCreator, getProcessIdentityProvider, getReaderProvider, getRequestAcceptorCreator, getRequestTaskCreator, getRootOidSelectorProvider, getRootTypeIdProvider, getTaskBrokerCreator, getThreadNameProvider, getThreadProvider, getTimestampProvider, getTypeDictionary, getWriterProvider, setBackupThreadProvider, setChannelThreadProvider, setDataChunkValidatorProvider2, setDataFileValidatorCreator, setEntityDataIteratorProvider, setEntityDataValidatorCreator, setEntityMarkMonitorCreator, setEventLogger, setExceptionHandler, setGCZombieOidHandler, setInitialDataFileNumberProvider, setLockFileManagerCreator, setLockFileManagerThreadProvider, setLockFileSetup, setLockFileSetupProvider, setObjectIdRangeEvaluator, setOidMarkQueueCreator, setOperationControllerCreator, setProcessIdentityProvider, setReaderProvider, setRootOidSelectorProvider, setThreadNameProvider, setThreadProvider, setWriterProvider
-
-
-
-
Method Detail
-
onConnectionFoundation
public F onConnectionFoundation(Consumer<? super EmbeddedStorageConnectionFoundation<?>> logic)
Description copied from interface:EmbeddedStorageFoundationExecutes the passed logic on theEmbeddedStorageConnectionFoundationinstance provided byEmbeddedStorageFoundation.getConnectionFoundation().This is a mere utility method to allow more concise syntax and multi-layered method chaining.
- Specified by:
onConnectionFoundationin interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
logic- the logic to be executed.- Returns:
- this to allow method chaining.
-
onThis
public F onThis(Consumer<? super EmbeddedStorageFoundation<?>> logic)
Description copied from interface:EmbeddedStorageFoundationExecutes the passed logic on this.This is a mere utility method to allow more concise syntax and multi-layered method chaining.
- Specified by:
onThisin interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
logic- the logic to be executed.- Returns:
- this to allow method chaining.
-
setRoot
public F setRoot(Object root)
Description copied from interface:EmbeddedStorageFoundationRegisters the passed root instance as the root instance at theEmbeddedStorageConnectionFoundationinstance 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:
setRootin 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),#setRootResolverProvider(PersistenceRootResolver),EmbeddedStorageConnectionFoundation#setRootResolverProvider(PersistenceRootResolver)
-
setRootSupplier
public F setRootSupplier(Supplier<?> rootSupplier)
Description copied from interface:EmbeddedStorageFoundationRegisters the passed rootSupplierSupplieras the root instance supplier at thePersistenceRootResolverProviderinstance provided byPersistenceFoundation.getRootResolverProvider()of theEmbeddedStorageConnectionFoundationinstance provided byEmbeddedStorageFoundation.getConnectionFoundation().This means this method is merely an alias for
.onConnectionFoundation(f -> f.getRootResolverProvider().registerCustomRootSupplier(rootSupplier);) }Note that replacing the
PersistenceRootResolverProviderinstance, 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:
setRootSupplierin 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),#setRootResolverProvider(PersistenceRootResolver),EmbeddedStorageConnectionFoundation#setRootResolverProvider(PersistenceRootResolver),EmbeddedStorageConnectionFoundation#registerCustomRootSupplier(PersistenceRootResolver)
-
setRootResolverProvider
public F setRootResolverProvider(PersistenceRootResolverProvider rootResolverProvider)
Description copied from interface:EmbeddedStorageFoundationAlias for
Sets the.onConnectionFoundation(f -> f.setRootResolverProvider(rootResolverProvider);) }PersistenceRootResolverProviderinstance to be used in the internalEmbeddedStorageConnectionFoundation.- Specified by:
setRootResolverProviderin interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
rootResolverProvider- thePersistenceRootResolverProviderto be set.- Returns:
- this to allow method chaining.
- See Also:
EmbeddedStorageFoundation.setRootSupplier(Supplier),EmbeddedStorageConnectionFoundation#setRootResolverProvider(PersistenceRootResolver)
-
getConnectionFoundation
public EmbeddedStorageConnectionFoundation<?> getConnectionFoundation()
Description copied from interface:EmbeddedStorageFoundationReturns the currently setStorageConfigurationinstance.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, aMissingFoundationPartExceptionis thrown.- Specified by:
getConnectionFoundationin interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Returns:
- the currently set instance, potentially created on-demand if required.
-
getRootResolverProvider
public PersistenceRootResolverProvider getRootResolverProvider()
Description copied from interface:EmbeddedStorageFoundationReturns the internalEmbeddedStorageConnectionFoundationinstance'sPersistenceRootResolverProviderinstance. If none is present so far, a new default one is created.- Specified by:
getRootResolverProviderin interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Returns:
- the
PersistenceRootResolverProviderinstance to be used.
-
setConfiguration
public F setConfiguration(StorageConfiguration configuration)
Description copied from interface:StorageFoundationSets theStorageConfigurationinstance to be used for the assembly.- Specified by:
setConfigurationin interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Overrides:
setConfigurationin classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
configuration- the instance to be used.- Returns:
- this to allow method chaining.
-
setRequestAcceptorCreator
public F setRequestAcceptorCreator(StorageRequestAcceptor.Creator requestAcceptorCreator)
Description copied from interface:StorageFoundationSets theStorageRequestAcceptor.Creatorinstance to be used for the assembly.- Specified by:
setRequestAcceptorCreatorin interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Overrides:
setRequestAcceptorCreatorin classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
requestAcceptorCreator- the instance to be used.- Returns:
- this to allow method chaining.
-
setTaskBrokerCreator
public F setTaskBrokerCreator(StorageTaskBroker.Creator taskBrokerCreator)
Description copied from interface:StorageFoundationSets theStorageTaskBroker.Creatorinstance to be used for the assembly.- Specified by:
setTaskBrokerCreatorin interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Overrides:
setTaskBrokerCreatorin 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:StorageFoundationSets theStorageDataChunkValidator.Providerinstance to be used for the assembly.- Specified by:
setDataChunkValidatorProviderin interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Overrides:
setDataChunkValidatorProviderin classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
dataChunkValidatorProvider- the instance to be used.- Returns:
- this to allow method chaining.
-
setChannelCreator
public F setChannelCreator(StorageChannelsCreator channelCreator)
Description copied from interface:StorageFoundationSets theStorageChannelsCreatorinstance to be used for the assembly.- Specified by:
setChannelCreatorin interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Overrides:
setChannelCreatorin classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
channelCreator- the instance to be used.- Returns:
- this to allow method chaining.
-
setTaskCreator
public F setTaskCreator(StorageRequestTaskCreator taskCreator)
Description copied from interface:StorageFoundationSets theStorageRequestTaskCreatorinstance to be used for the assembly.- Specified by:
setTaskCreatorin interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Overrides:
setTaskCreatorin classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
taskCreator- the instance to be used.- Returns:
- this to allow method chaining.
-
setTypeDictionary
public F setTypeDictionary(StorageTypeDictionary typeDictionary)
Description copied from interface:StorageFoundationSets theStorageTypeDictionaryinstance to be used for the assembly.- Specified by:
setTypeDictionaryin interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Overrides:
setTypeDictionaryin classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
typeDictionary- the instance to be used.- Returns:
- this to allow method chaining.
-
setRootTypeIdProvider
public F setRootTypeIdProvider(StorageRootTypeIdProvider rootTypeIdProvider)
Description copied from interface:StorageFoundationSets theStorageRootTypeIdProviderinstance to be used for the assembly.- Specified by:
setRootTypeIdProviderin interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Overrides:
setRootTypeIdProviderin classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
rootTypeIdProvider- the instance to be used.- Returns:
- this to allow method chaining.
-
setConnectionFoundation
public F setConnectionFoundation(EmbeddedStorageConnectionFoundation<?> connectionFoundation)
Description copied from interface:EmbeddedStorageFoundationSets theEmbeddedStorageConnectionFoundationinstance to be used for the assembly.- Specified by:
setConnectionFoundationin interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
connectionFoundation- the instance to be used.- Returns:
- this to allow method chaining.
-
setRefactoringMappingProvider
public F setRefactoringMappingProvider(PersistenceRefactoringMappingProvider refactoringMappingProvider)
Description copied from interface:EmbeddedStorageFoundationSets the passedPersistenceRefactoringMappingProviderinstance to theEmbeddedStorageConnectionFoundationinstance provided byEmbeddedStorageFoundation.getConnectionFoundation().- Specified by:
setRefactoringMappingProviderin interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
refactoringMappingProvider- the instance to be used.- Returns:
- this to allow method chaining.
- See Also:
PersistenceFoundation.setRefactoringMappingProvider(PersistenceRefactoringMappingProvider)
-
setTimestampProvider
public F setTimestampProvider(StorageTimestampProvider timestampProvider)
Description copied from interface:StorageFoundationSets theStorageTimestampProviderinstance to be used for the assembly.- Specified by:
setTimestampProviderin interfaceStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Overrides:
setTimestampProviderin classStorageFoundation.Default<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
timestampProvider- the instance to be used.- Returns:
- this to allow method chaining.
-
executeTypeHandlerRegistration
public F executeTypeHandlerRegistration(PersistenceTypeHandlerRegistration<Binary> typeHandlerRegistration)
Description copied from interface:EmbeddedStorageFoundationConvenience method forthis.getConnectionFoundation().executeTypeHandlerRegistration(typeHandlerRegistration).See
PersistenceFoundation.executeTypeHandlerRegistration(PersistenceTypeHandlerRegistration)for details.- Specified by:
executeTypeHandlerRegistrationin interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
typeHandlerRegistration- thePersistenceTypeHandlerRegistrationto be executed.- Returns:
- this to allow method chaining.
-
createEmbeddedStorageManager
public EmbeddedStorageManager createEmbeddedStorageManager(Object root)
Description copied from interface:EmbeddedStorageFoundationCreates and returns a newEmbeddedStorageManagerinstance 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
EmbeddedStorageManagerinstance will NOT yet be started.- Specified by:
createEmbeddedStorageManagerin interfaceEmbeddedStorageFoundation<F extends EmbeddedStorageFoundation.Default<?>>- Parameters:
root- the instance to be used as the persistent entity graph's root instance.- Returns:
- a new
EmbeddedStorageManagerinstance. - See Also:
EmbeddedStorageFoundation.createEmbeddedStorageManager(),#createEmbeddedStorageManager(Supplier),EmbeddedStorageFoundation.start(),EmbeddedStorageFoundation.start(Object)
-
-