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 void
checkAcceptingTasks()
StorageConfiguration
configuration()
StorageRequestAcceptor
createRequestAcceptor()
StorageIdAnalysis
initializationIdAnalysis()
long
initializationTime()
boolean
isAcceptingTasks()
boolean
isActive()
Queries whether the part is actually active right now.boolean
isRunning()
boolean
isShuttingDown()
boolean
isStartingUp()
void
killStorage(Throwable cause)
Stops all threads, releases all resources (e.g.StorageObjectIdRangeEvaluator
objectIdRangeEvaluator()
StorageOperationController
operationController()
long
operationModeTime()
boolean
shutdown()
StorageSystem.Default
start()
StorageTypeDictionary
typeDictionary()
-
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.StorageController
close, initializationDuration, isShutdown
-
Methods inherited from interface one.microstream.storage.types.StorageSystem
channelCountProvider
-
-
-
-
Constructor Detail
-
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 Detail
-
configuration
public final StorageConfiguration configuration()
- Specified by:
configuration
in interfaceStorageSystem
-
isRunning
public final boolean isRunning()
- Specified by:
isRunning
in interfaceStorageController
-
isActive
public final boolean isActive()
Description copied from interface:StorageActivePart
Queries whether the part is actually active right now. This might returntrue
even despite some "running" flag being set tofalse
because there might be one last loop cycle execution before checking the "running" flag again.- Specified by:
isActive
in interfaceStorageActivePart
- Returns:
- if the part is actually active right now.
-
isAcceptingTasks
public final boolean isAcceptingTasks()
- Specified by:
isAcceptingTasks
in interfaceStorageController
-
isStartingUp
public final boolean isStartingUp()
- Specified by:
isStartingUp
in interfaceStorageController
-
isShuttingDown
public final boolean isShuttingDown()
- Specified by:
isShuttingDown
in interfaceStorageController
-
initializationTime
public final long initializationTime()
- Specified by:
initializationTime
in interfaceStorageController
-
operationModeTime
public final long operationModeTime()
- Specified by:
operationModeTime
in interfaceStorageController
-
checkAcceptingTasks
public final void checkAcceptingTasks()
- Specified by:
checkAcceptingTasks
in interfaceStorageController
-
start
public final StorageSystem.Default start()
- Specified by:
start
in interfaceStorageController
- Specified by:
start
in interfaceStorageSystem
-
initializationIdAnalysis
public final StorageIdAnalysis initializationIdAnalysis()
- Specified by:
initializationIdAnalysis
in interfaceStorageSystem
-
shutdown
public final boolean shutdown()
- Specified by:
shutdown
in interfaceStorageController
- Specified by:
shutdown
in interfaceStorageSystem
-
typeDictionary
public final StorageTypeDictionary typeDictionary()
- Specified by:
typeDictionary
in interfaceStorageSystem
-
operationController
public StorageOperationController operationController()
- Specified by:
operationController
in interfaceStorageSystem
-
objectIdRangeEvaluator
public StorageObjectIdRangeEvaluator objectIdRangeEvaluator()
- Specified by:
objectIdRangeEvaluator
in interfaceStorageSystem
-
createRequestAcceptor
public final StorageRequestAcceptor createRequestAcceptor()
- Specified by:
createRequestAcceptor
in interfaceStorageSystem
-
killStorage
public void killStorage(Throwable cause)
Description copied from interface:StorageKillable
Stops 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:
killStorage
in interfaceStorageKillable
-
-