Class AwsSecretCache.Options

java.lang.Object
codes.grow.packages.awssecretsmanager.AwsSecretCache.Options
Enclosing class:
AwsSecretCache

public static final class AwsSecretCache.Options extends Object
Options of AwsSecretCache.
  • Field Details

    • DEFAULT_TTL

      public static final Duration DEFAULT_TTL
      Default refresh interval (1 h, the AWS caching-client default).
    • DEFAULT_MAX_ENTRIES

      public static final int DEFAULT_MAX_ENTRIES
      Default LRU capacity (1 024, the AWS caching-client default).
      See Also:
  • Method Details

    • builder

      public static AwsSecretCache.Options.Builder builder()
      Starts a builder with the AWS defaults.
      Returns:
      a new builder
    • ttl

      public Duration ttl()
      Returns the refresh interval.
      Returns:
      the TTL
    • maxEntries

      public int maxEntries()
      Returns the LRU capacity.
      Returns:
      the maximum number of entries
    • versionStage

      public String versionStage()
      Returns the default stage label.
      Returns:
      the stage
    • clock

      public Clock clock()
      Returns the clock.
      Returns:
      the clock
    • onRefreshError

      public Consumer<Throwable> onRefreshError()
      Returns the handler of failed refreshes.
      Returns:
      the handler, or null