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