Interface IResourceChangeListenerCache

All Known Implementing Classes:
ResourceChangeListenerCache

This is a handle to the cache created by IResourceChangeListenerRegistry when a listener is registered. This this handle can be used to refresh the cache if required.
  • Method Details

    • getSearchParameterMap

      Returns:
      the search parameter map the listener was registered with
    • isInitialized

      boolean isInitialized()
      Returns:
      whether the cache has been initialized. (If not, the cache will be empty.)
    • getResourceName

      Returns:
      the name of the resource type the listener was registered with
    • getNextRefreshTime

      Returns:
      the next scheduled time the cache will search the repository, update its cache and notify its listener of any changes
    • requestRefresh

      sets the nextRefreshTime to
      invalid reference
      Instant.MIN
      so that the cache will be refreshed and listeners notified in another thread the next time cache refresh times are checked (every
      invalid reference
      ResourceChangeListenerCacheRefresherImpl.LOCAL_REFRESH_INTERVAL_MS
      .
    • forceRefresh

      Refresh the cache immediately in the current thread and notify its listener if there are any changes
      Returns:
      counts of detected resource creates, updates and deletes
    • refreshCacheIfNecessary

      If nextRefreshTime is in the past, then update the cache with the current repository contents and notify its listener of any changes
      Returns:
      counts of detected resource creates, updates and deletes