Interface CryptoMaterialsCache.CacheHint

Enclosing interface:
CryptoMaterialsCache

public static interface CryptoMaterialsCache.CacheHint
Contains some additional information associated with a cache entry. The cache receiving this hint may take some actions based on the hint, or it may ignore it entirely.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the lifetime of the cache entry.
  • Method Details

    • getMaxAgeMillis

      long getMaxAgeMillis()
      Returns the lifetime of the cache entry. This hint suggests to the cache that the entry will not be useful after the provided number of milliseconds passes, and suggests that the cache should discard the entry when this interval elapses even if it is not explicitly invalidated.

      Note that this time counts from the creation of the entry, not from last use.

      Returns:
      The lifetime of this entry, in milliseconds. If the lifetime is unknown or irrelevant, this will return Long.MAX_VALUE.