Package one.microstream.storage.types
Class StorageSystem.Default
java.lang.Object
one.microstream.storage.types.StorageSystem.Default
- All Implemented Interfaces:
AutoCloseable,Unpersistable,StorageActivePart,StorageController,StorageKillable,StorageSystem
- Enclosing interface:
- StorageSystem
public static final class StorageSystem.Default extends Object implements StorageSystem, Unpersistable, StorageKillable
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageSystem
StorageSystem.Default -
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidcheckAcceptingTasks()StorageConfigurationconfiguration()StorageRequestAcceptorcreateRequestAcceptor()StorageIdAnalysisinitializationIdAnalysis()longinitializationTime()booleanisAcceptingTasks()booleanisActive()Queries whether the part is actually active right now.booleanisRunning()booleanisShuttingDown()booleanisStartingUp()voidkillStorage(Throwable cause)Stops all threads, releases all resources (e.g.StorageObjectIdRangeEvaluatorobjectIdRangeEvaluator()StorageOperationControlleroperationController()longoperationModeTime()booleanshutdown()Issues a command to shut down all active threads managing the storage.StorageSystem.Defaultstart()"Starts" the storage controlled by thisStorageControllerinstance, with "starting" meaning:
Reading, indexing and potentially caching all the persisted data in the storage. Starting storage managing threads to execute requests like storing, loading and issued utility functions.StorageTypeDictionarytypeDictionary()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface one.microstream.storage.types.StorageController
close, initializationDuration, isShutdown
-
Constructor Details
-
Default
public Default(StorageConfiguration storageConfiguration, StorageOperationController.Creator ocCreator, StorageDataFileValidator.Creator backupDataFileValidatorCreator, StorageFileWriter.Provider writerProvider, StorageFileReader.Provider readerProvider, StorageInitialDataFileNumberProvider initialDataFileNumberProvider, StorageRequestAcceptor.Creator requestAcceptorCreator, StorageTaskBroker.Creator taskBrokerCreator, StorageDataChunkValidator.Provider dataChunkValidatorProvider, StorageChannelsCreator channelCreator, StorageThreadProvider threadProvider, StorageRequestTaskCreator requestTaskCreator, StorageTypeDictionary typeDictionary, StorageRootTypeIdProvider rootTypeIdProvider, StorageTimestampProvider timestampProvider, StorageObjectIdRangeEvaluator objectIdRangeEvaluator, StorageGCZombieOidHandler zombieOidHandler, StorageRootOidSelector.Provider rootOidSelectorProvider, StorageObjectIdMarkQueue.Creator oidMarkQueueCreator, StorageEntityMarkMonitor.Creator entityMarkMonitorCreator, boolean switchByteOrder, StorageLockFileSetup lockFileSetup, StorageLockFileManager.Creator lockFileManagerCreator, StorageExceptionHandler exceptionHandler, StorageEventLogger eventLogger)
-
-
Method Details
-
configuration
- Specified by:
configurationin interfaceStorageSystem
-
isRunning
public final boolean isRunning()- Specified by:
isRunningin interfaceStorageController
-
isActive
public final boolean isActive()Description copied from interface:StorageActivePartQueries whether the part is actually active right now. This might returntrueeven despite some "running" flag being set tofalsebecause there might be one last loop cycle execution before checking the "running" flag again.- Specified by:
isActivein interfaceStorageActivePart- Returns:
- if the part is actually active right now.
-
isAcceptingTasks
public final boolean isAcceptingTasks()- Specified by:
isAcceptingTasksin interfaceStorageController
-
isStartingUp
public final boolean isStartingUp()- Specified by:
isStartingUpin interfaceStorageController
-
isShuttingDown
public final boolean isShuttingDown()- Specified by:
isShuttingDownin interfaceStorageController
-
initializationTime
public final long initializationTime()- Specified by:
initializationTimein interfaceStorageController
-
operationModeTime
public final long operationModeTime()- Specified by:
operationModeTimein interfaceStorageController
-
checkAcceptingTasks
public final void checkAcceptingTasks()- Specified by:
checkAcceptingTasksin interfaceStorageController
-
start
Description copied from interface:StorageController"Starts" the storage controlled by thisStorageControllerinstance, with "starting" meaning:
- Reading, indexing and potentially caching all the persisted data in the storage.
- Starting storage managing threads to execute requests like storing, loading and issued utility functions.
- Specified by:
startin interfaceStorageController- Specified by:
startin interfaceStorageSystem- Returns:
- this to allow writing of fluent code.
-
initializationIdAnalysis
- Specified by:
initializationIdAnalysisin interfaceStorageSystem
-
shutdown
public final boolean shutdown()Description copied from interface:StorageControllerIssues a command to shut down all active threads managing the storage.- Specified by:
shutdownin interfaceStorageController- Specified by:
shutdownin interfaceStorageSystem- Returns:
trueafter a successful shutdown orfalseif an internalInterruptedExceptionhappened.
-
typeDictionary
- Specified by:
typeDictionaryin interfaceStorageSystem
-
operationController
- Specified by:
operationControllerin interfaceStorageSystem
-
objectIdRangeEvaluator
- Specified by:
objectIdRangeEvaluatorin interfaceStorageSystem
-
createRequestAcceptor
- Specified by:
createRequestAcceptorin interfaceStorageSystem
-
killStorage
Description copied from interface:StorageKillableStops all threads, releases all resources (e.g. close files) without considering any internal state or waiting for any action to be completed.Useful only in simple error cases, for example
- Specified by:
killStoragein interfaceStorageKillable
-