com.datumbox.framework.common.storage.abstracts
Class AbstractStorageEngine<SC extends StorageConfiguration>
- java.lang.Object
-
- com.datumbox.framework.common.storage.abstracts.AbstractStorageEngine<SC>
-
- All Implemented Interfaces:
- StorageEngine, java.lang.AutoCloseable
- Direct Known Subclasses:
- AbstractFileStorageEngine
public abstract class AbstractStorageEngine<SC extends StorageConfiguration> extends java.lang.Object implements StorageEngine
The AbstractStorageEngine is the base class for all concrete storage engines. Those classes can be used in a try-with-resources statement block. Moreover this class setups a shutdown hook which ensures that the storage engine will automatically call close() before the JVM is terminated. Finally it contains methods to store complex objects with fields that point to other serialized objects.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.datumbox.framework.common.storage.interfaces.StorageEngine
StorageEngine.MapType, StorageEngine.StorageHint
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()java.lang.StringgetStorageName()Returns the name of the storage.booleanisClosed()Checks if the storage engine is closed.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.datumbox.framework.common.storage.interfaces.StorageEngine
clear, dropBigMap, existsObject, getBigMap, loadObject, rename, saveObject
-
-
-
-
Method Detail
-
getStorageName
public java.lang.String getStorageName()
Returns the name of the storage.- Specified by:
getStorageNamein interfaceStorageEngine- Returns:
-
isClosed
public boolean isClosed()
Checks if the storage engine is closed.- Specified by:
isClosedin interfaceStorageEngine- Returns:
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-
DataMelt 3.0 © DataMelt by jWork.ORG