Enum CacheStatefulBehaviour

java.lang.Object
java.lang.Enum<CacheStatefulBehaviour>
org.cruk.clarity.api.cache.CacheStatefulBehaviour
All Implemented Interfaces:
Serializable, Comparable<CacheStatefulBehaviour>, java.lang.constant.Constable

public enum CacheStatefulBehaviour extends Enum<CacheStatefulBehaviour>
Options for how the API cache handles entities that are stateful.
Since:
2.22
  • Enum Constant Details

    • EXACT

      public static final CacheStatefulBehaviour EXACT
      The version of the entity in the cache must match exactly, otherwise it is fetched from the server.
    • LATEST

      public static final CacheStatefulBehaviour LATEST
      The entity is fetched if the version in the cache is older than the version in the URI. If the same, newer, or the URI has no state version, the cached version is returned.
    • ANY

      public static final CacheStatefulBehaviour ANY
      Only fetch entities if they are not in the cache. The state version is ignored.
  • Method Details

    • values

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

      public static CacheStatefulBehaviour valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null