openhab-addons/bundles/org.openhab.persistence.inmemory
openhab-bot 7f32499a8a
New Crowdin updates (#15739)
* New translations jpa.properties (Italian)
* New translations inmemory.properties (Italian)
* New translations mapdb.properties (Italian)
* New translations mongodb.properties (Italian)
* New translations rrd4j.properties (Italian)
2023-10-11 21:53:14 +02:00
..
src New Crowdin updates (#15739) 2023-10-11 21:53:14 +02:00
NOTICE [inmemory] Initial contribution (#15063) 2023-06-24 11:15:09 +02:00
pom.xml Apply spotless 2023-07-24 01:20:31 +02:00
README.md [inmemory] Initial contribution (#15063) 2023-06-24 11:15:09 +02:00

InMemory Persistence

The InMemory persistence service provides a volatile storage, i.e. it is cleared on shutdown. Because of that the restoreOnStartup strategy is not supported for this service.

The main use-case is to store data that is needed during runtime, e.g. temporary storage of forecast data that is retrieved from a binding.

Since all data is stored in memory only, there is no default strategy for this service. Unlike other persistence services, you MUST add a configuration, otherwise no data will be persisted. To avoid excessive memory usage, it is recommended to persist only a limited number of items and use a strategy that stores only data that is actually needed.

The service has a global configuration option maxEntries to limit the number of datapoints per item, the default value is 512. When the number of datapoints is reached and a new value is persisted, the oldest (by timestamp) value will be removed. A maxEntries value of 0 disables automatic purging.