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 Type
    Method
    Description
    void
    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 the PersistenceManager about a potential impact.
  • Method Details

    • handleExternalPersistenceDataChange

      void handleExternalPersistenceDataChange(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 the PersistenceManager about a potential impact. The PersistenceManager will 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 service
      item - the item for which persisted data has been updated