Interface CacheState

All Known Implementing Classes:
CacheStateEnum

public interface CacheState
The interface defines the different possible transitions from a CacheState to another one
  • Method Summary

    Modifier and Type Method Description
    void desync​(CacheContext cacheContext)
    The cache entry is marked as Desynchronized
    void error​(CacheContext cacheContext, CachedException exception)
    The cache entry is marked in error state with the related exception
    void refreshNeeded​(CacheContext cacheContext)
    The cache entry needs to be refreshed
    void sync​(CacheContext cacheContext)
    The cache entry is marked as Synchronized
    void toBeDeleted​(CacheContext cacheContext)
    The cache entry is marked as to be deleted
  • Method Details

    • sync

      void sync​(CacheContext cacheContext)
      The cache entry is marked as Synchronized
      Parameters:
      cacheContext - the current cache context
    • desync

      void desync​(CacheContext cacheContext)
      The cache entry is marked as Desynchronized
      Parameters:
      cacheContext - the current cache context
    • refreshNeeded

      void refreshNeeded​(CacheContext cacheContext)
      The cache entry needs to be refreshed
      Parameters:
      cacheContext - the current cache context
    • toBeDeleted

      void toBeDeleted​(CacheContext cacheContext)
      The cache entry is marked as to be deleted
      Parameters:
      cacheContext - the current cache context
    • error

      void error​(CacheContext cacheContext, CachedException exception)
      The cache entry is marked in error state with the related exception
      Parameters:
      cacheContext - the current cache context
      exception - the wrapped met exception