Class StorageWriteControllerReadOnlyMode

java.lang.Object
one.microstream.storage.types.StorageWriteControllerReadOnlyMode
All Implemented Interfaces:
WriteController, PersistenceWriteController, StorageWriteController

public class StorageWriteControllerReadOnlyMode
extends Object
implements StorageWriteController
StorageWriteController implementation 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();