Package one.microstream.storage.types
Class StorageWriteControllerReadOnlyMode
- java.lang.Object
-
- one.microstream.storage.types.StorageWriteControllerReadOnlyMode
-
- All Implemented Interfaces:
one.microstream.afs.types.WriteController,one.microstream.persistence.types.PersistenceWriteController,StorageWriteController
public class StorageWriteControllerReadOnlyMode extends Object implements StorageWriteController
StorageWriteControllerimplementation that allows to switch between the supplied and a read only StorageWriteController. If the read only mode is disabled the supplied StorageWriteController will be used.
Setup:final EmbeddedStorageFoundation<?> foundation = EmbeddedStorage.Foundation(); final StorageWriteControllerReadOnlyMode storageWriteController = new StorageWriteControllerReadOnlyMode(foundation.getWriteController()); foundation.setWriteController(storageWriteController); final EmbeddedStorageManager storage = foundation.start();
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceWriteController
one.microstream.persistence.types.PersistenceWriteController.Disabled, one.microstream.persistence.types.PersistenceWriteController.Enabled
-
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageWriteController
StorageWriteController.Wrapper
-
-
Constructor Summary
Constructors Constructor Description StorageWriteControllerReadOnlyMode(one.microstream.afs.types.WriteController writeController)Create a new instance of a StorageWriteControllerReadOnlyMode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBackupEnabled()booleanisDeletionDirectoryEnabled()booleanisFileCleanupEnabled()booleanisFileDeletionEnabled()booleanisReadOnly()booleanisWritable()voidsetReadOnly(boolean readOnly)voidvalidateIsWritable()-
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.PersistenceWriteController
isStoringEnabled, validateIsStoringEnabled
-
Methods inherited from interface one.microstream.storage.types.StorageWriteController
validateIsBackupEnabled, validateIsDeletionDirectoryEnabled, validateIsFileCleanupEnabled, validateIsFileDeletionEnabled
-
-
-
-
Constructor Detail
-
StorageWriteControllerReadOnlyMode
public StorageWriteControllerReadOnlyMode(one.microstream.afs.types.WriteController writeController)
Create a new instance of a StorageWriteControllerReadOnlyMode. The constructed instance will have the read only mode ENABLED.- Parameters:
writeController- theStorageWriteControllerinstance that is used if the read only mode is disabled.
-
-
Method Detail
-
setReadOnly
public void setReadOnly(boolean readOnly)
-
isReadOnly
public boolean isReadOnly()
-
validateIsWritable
public void validateIsWritable()
- Specified by:
validateIsWritablein interfaceone.microstream.afs.types.WriteController
-
isWritable
public boolean isWritable()
- Specified by:
isWritablein interfaceone.microstream.afs.types.WriteController
-
isFileCleanupEnabled
public boolean isFileCleanupEnabled()
- Specified by:
isFileCleanupEnabledin interfaceStorageWriteController
-
isBackupEnabled
public boolean isBackupEnabled()
- Specified by:
isBackupEnabledin interfaceStorageWriteController
-
isDeletionDirectoryEnabled
public boolean isDeletionDirectoryEnabled()
- Specified by:
isDeletionDirectoryEnabledin interfaceStorageWriteController
-
isFileDeletionEnabled
public boolean isFileDeletionEnabled()
- Specified by:
isFileDeletionEnabledin interfaceStorageWriteController
-
-