Enum Class ReferenceCache.ReferenceType

java.lang.Object
java.lang.Enum<ReferenceCache.ReferenceType>
cloud.opencode.base.cache.ReferenceCache.ReferenceType
All Implemented Interfaces:
Serializable, Comparable<ReferenceCache.ReferenceType>, Constable
Enclosing class:
ReferenceCache<K,V>

public static enum ReferenceCache.ReferenceType extends Enum<ReferenceCache.ReferenceType>
Reference type for cache entries 缓存条目的引用类型
Since:
JDK 25, opencode-base-cache V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Enum Constant Details

    • WEAK

      public static final ReferenceCache.ReferenceType WEAK
      Both keys and values use weak references 键和值都使用弱引用
    • SOFT

      public static final ReferenceCache.ReferenceType SOFT
      Both keys and values use soft references 键和值都使用软引用
    • WEAK_KEYS

      public static final ReferenceCache.ReferenceType WEAK_KEYS
      Only keys use weak references, values are strong 仅键使用弱引用,值是强引用
    • SOFT_VALUES

      public static final ReferenceCache.ReferenceType SOFT_VALUES
      Only values use soft references, keys are strong 仅值使用软引用,键是强引用
  • Method Details

    • values

      public static ReferenceCache.ReferenceType[] 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 ReferenceCache.ReferenceType 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