Class ExpirationTimeContext<T>

java.lang.Object
net.shibboleth.oidc.metadata.cache.ExpirationTimeContext<T>
Type Parameters:
T - The metadata type.

@Immutable public class ExpirationTimeContext<T> extends Object
Context to hold information pertaining to the computation of a metadata's expiration time.
  • Field Details

    • metadata

      @Nonnull private final T metadata
      The metadata to base the expiry time off.
    • minCacheDuration

      @Nonnull private final Duration minCacheDuration
      Minimum cache duration.
    • maxCacheDuration

      @Nonnull private final Duration maxCacheDuration
      Maximum cache duration.
    • now

      @Nonnull private final Instant now
      The now time to base computation off.
  • Constructor Details

    • ExpirationTimeContext

      public ExpirationTimeContext(@Nonnull T metadataIn, @Nonnull Duration minimumCacheDuration, @Nonnull Duration maximumCacheDuration, @Nonnull Instant timeNow)
      Constructor.
      Parameters:
      metadataIn - the metadata to base the expiry time off.
      minimumCacheDuration - minimum cache duration.
      maximumCacheDuration - maximum cache duration.
      timeNow - the now time to base computation off.
  • Method Details

    • getMetadata

      public final T getMetadata()
      Get the metadata.
      Returns:
      Returns the metadata.
    • getMinCacheDuration

      public final Duration getMinCacheDuration()
      Get the minimum cache duration.
      Returns:
      Returns the minCacheDuration.
    • getMaxCacheDuration

      public final Duration getMaxCacheDuration()
      Get the maximum cache duration.
      Returns:
      Returns the maxCacheDuration.
    • getNow

      public final Instant getNow()
      Get the time to use a 'now'.
      Returns:
      Returns now.