Enum Class MemorySpec.PruneStrategy

java.lang.Object
java.lang.Enum<MemorySpec.PruneStrategy>
com.tnsai.annotations.MemorySpec.PruneStrategy
All Implemented Interfaces:
Serializable, Comparable<MemorySpec.PruneStrategy>, Constable
Enclosing class:
MemorySpec

public static enum MemorySpec.PruneStrategy extends Enum<MemorySpec.PruneStrategy>
Pruning strategies.
  • Enum Constant Details

    • SLIDING_WINDOW

      public static final MemorySpec.PruneStrategy SLIDING_WINDOW
      Remove oldest messages first (FIFO)
    • RELEVANCE

      public static final MemorySpec.PruneStrategy RELEVANCE
      Keep the most relevant messages: on capacity overflow the messages with the lowest TF-IDF relevance to the most recent message are evicted (ties evict oldest-first, degrading to sliding window).
    • SUMMARIZE

      public static final MemorySpec.PruneStrategy SUMMARIZE
      Summarize and compress old messages. Wraps the store in a summarizing decorator; if summarization is unavailable the store falls back to a real sliding-window prune.
    • TOKEN_LIMIT

      public static final MemorySpec.PruneStrategy TOKEN_LIMIT
      Remove based on token count
    • NONE

      public static final MemorySpec.PruneStrategy NONE
      Never prune (may cause errors)
  • Method Details

    • values

      public static MemorySpec.PruneStrategy[] 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 MemorySpec.PruneStrategy 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