Package org.openhab.core.persistence
Interface PersistenceManager
@NonNullByDefault
public interface PersistenceManager
The
PersistenceManager interface is used to communicate between external components (e.g. REST interface)
that modify persisted data bypassing the PersistenceManagerImpl. This
is required because forecast jobs might need an update when the persisted data changes.- Author:
- Jan N. Klug - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandleExternalPersistenceDataChange(PersistenceService persistenceService, Item item) External code that updates persisted data, that may have an impact on the persistence logic (restoring item states, forecast logic), should call this method to inform thePersistenceManagerabout a potential impact.
-
Method Details
-
handleExternalPersistenceDataChange
External code that updates persisted data, that may have an impact on the persistence logic (restoring item states, forecast logic), should call this method to inform thePersistenceManagerabout a potential impact. ThePersistenceManagerwill query the service again to get the necessary information. This all happens in the calling thread and may therefore take some time. If this is undesired, this call should be performed asynchronously.- Parameters:
persistenceService- the persistence serviceitem- the item for which persisted data has been updated
-