Interface EvictionConfiguration


public interface EvictionConfiguration
Encapsulates eviction configuration.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    When present, defines the duration of time after which managed state should be considered idle, and thus eligible for eviction.
    default OptionalInt
    When present, defines the maximum number of elements to retain in memory, beyond which least recently used elements will be evicted.
  • Method Details

    • getSizeThreshold

      default OptionalInt getSizeThreshold()
      When present, defines the maximum number of elements to retain in memory, beyond which least recently used elements will be evicted.
      Returns:
      an optional eviction threshold size
    • getIdleThreshold

      default Optional<Duration> getIdleThreshold()
      When present, defines the duration of time after which managed state should be considered idle, and thus eligible for eviction.
      Returns:
      an optional eviction threshold duration