Class CaffeineCacheAccessTokenResolver.Builder

    • Constructor Detail

      • Builder

        public Builder​(com.github.benmanes.caffeine.cache.Caffeine<Object,​Object> caffeine,
                       AccessTokenResolver delegate,
                       Clock clock,
                       Duration defaultTimeout,
                       Duration maximumTimeout)
        Creates a CaffeineCacheAccessTokenResolver.Builder delegating to the given AccessTokenResolver using the given (pre-configured) cache.
        Parameters:
        caffeine - The caffeine cache to use. Not null.
        delegate - The resolver to use. Not null.
        clock - A clock providing access to the current instant, date and time using a time-zone, not null.
        defaultTimeout - The default duration for which to cache AM access tokens. If an AM access token provides a valid expiresAt value to specify the time until which the access token remains valid, IG uses that value or the maxTimeout. Not null.
        maximumTimeout - The maximum duration for which to cache AM access tokens. If the expiresAt value provided by the AM access token is after the current time plus the maxTimeout, IG uses the maxTimeout. Can be null.