Enum Class CacheStateEnum

java.lang.Object
java.lang.Enum<CacheStateEnum>
eu.europa.esig.dss.tsl.cache.state.CacheStateEnum
All Implemented Interfaces:
CacheState, Serializable, Comparable<CacheStateEnum>, Constable

public enum CacheStateEnum extends Enum<CacheStateEnum> implements CacheState
Contains states for a cache record
  • Enum Constant Details

    • REFRESH_NEEDED

      public static final CacheStateEnum REFRESH_NEEDED
      Nothing / Expired content is stored in the cache
    • DESYNCHRONIZED

      public static final CacheStateEnum DESYNCHRONIZED
      The cache content is not synchronized with the application
    • SYNCHRONIZED

      public static final CacheStateEnum SYNCHRONIZED
      The application and the cache content are synchronized
    • ERROR

      public static final CacheStateEnum ERROR
      The data cannot be downloaded / parsed / validated
    • TO_BE_DELETED

      public static final CacheStateEnum TO_BE_DELETED
      The cache content needs to be deleted
  • Method Details

    • values

      public static CacheStateEnum[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CacheStateEnum valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • sync

      public void sync(CacheContext cacheContext)
      Description copied from interface: CacheState
      The cache entry is marked as Synchronized
      Specified by:
      sync in interface CacheState
      Parameters:
      cacheContext - the current cache context
    • desync

      public void desync(CacheContext cacheContext)
      Description copied from interface: CacheState
      The cache entry is marked as Desynchronized
      Specified by:
      desync in interface CacheState
      Parameters:
      cacheContext - the current cache context
    • refreshNeeded

      public void refreshNeeded(CacheContext cacheContext)
      Description copied from interface: CacheState
      The cache entry needs to be refreshed
      Specified by:
      refreshNeeded in interface CacheState
      Parameters:
      cacheContext - the current cache context
    • toBeDeleted

      public void toBeDeleted(CacheContext cacheContext)
      Description copied from interface: CacheState
      The cache entry is marked as to be deleted
      Specified by:
      toBeDeleted in interface CacheState
      Parameters:
      cacheContext - the current cache context
    • error

      public void error(CacheContext cacheContext, CachedExceptionWrapper exception)
      Description copied from interface: CacheState
      The cache entry is marked in error state with the related exception
      Specified by:
      error in interface CacheState
      Parameters:
      cacheContext - the current cache context
      exception - the wrapped met exception