Package org.openhab.core.test.storage
Class VolatileStorageService
java.lang.Object
org.openhab.core.test.storage.VolatileStorageService
- All Implemented Interfaces:
StorageService
The
VolatileStorageService returns VolatileStorages
which stores their data in-memory.- Author:
- Thomas Eichstaedt-Engelen - Initial contribution
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Storage<T> getStorage(String name) Returns theStoragewith the givenname.<T> Storage<T> getStorage(String name, @Nullable ClassLoader classLoader)
-
Constructor Details
-
VolatileStorageService
public VolatileStorageService()
-
-
Method Details
-
getStorage
Description copied from interface:StorageServiceReturns theStoragewith the givenname. If noStoragewith this name exists a new initialized instance is returned.- Specified by:
getStoragein interfaceStorageService- Parameters:
name- the name of theStorageServiceto return- Returns:
- a ready to use
Storage, nevernull
-
getStorage
Description copied from interface:StorageServiceReturns theStoragewith the givennameand a givenClassLoader. If noStoragewith this name exists a new initialized instance is returned.- Specified by:
getStoragein interfaceStorageService- Type Parameters:
T- The type of the storage service- Parameters:
name- the name of theStorageServiceto returnclassLoader- the class loader which should be used by theStorage- Returns:
- a ready to use
Storage, nevernull
-