public class TokenCacheConfiguration extends Object implements CacheConfiguration
| Modifier and Type | Method and Description |
|---|---|
static TokenCacheConfiguration |
cacheDisabled()
The default cache configuration.
|
static TokenCacheConfiguration |
defaultConfiguration()
A special cache configuration used to disable caching.
|
boolean |
equals(Object o) |
Duration |
getCacheDuration() |
int |
getCacheSize() |
static TokenCacheConfiguration |
getInstance(Duration cacheDuration,
int cacheSize,
Duration tokenExpirationDelta)
Creates a new
TokenCacheConfiguration instance with the given
properties. |
static TokenCacheConfiguration |
getInstance(Duration cacheDuration,
int cacheSize,
Duration tokenExpirationDelta,
boolean cacheStatisticsEnabled)
Creates a new
TokenCacheConfiguration instance with the given
properties. |
Duration |
getTokenExpirationDelta()
If a cached token expires because its expiration time (exp) has been reached,
it should not be retrieved from the cache.
|
int |
hashCode() |
boolean |
isCacheStatisticsEnabled() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisCacheDisabledpublic static TokenCacheConfiguration getInstance(@Nonnull Duration cacheDuration, int cacheSize, @Nonnull Duration tokenExpirationDelta)
TokenCacheConfiguration instance with the given
properties. See CacheConfiguration.getCacheDuration(),
CacheConfiguration.getCacheSize() and
getTokenExpirationDelta() for an explanation
of the respective properties.cacheDuration - the cache duration property.cacheSize - the cache size property.tokenExpirationDelta - the token expiration delta.TokenCacheConfiguration instance.public static TokenCacheConfiguration getInstance(Duration cacheDuration, int cacheSize, Duration tokenExpirationDelta, boolean cacheStatisticsEnabled)
TokenCacheConfiguration instance with the given
properties. See CacheConfiguration.getCacheDuration(),
CacheConfiguration.getCacheSize(),
getTokenExpirationDelta() and
CacheConfiguration.isCacheStatisticsEnabled() for an explanation of
the respective properties.cacheDuration - the cache duration property.cacheSize - the cache size property.tokenExpirationDelta - the token expiration delta.cacheStatisticsEnabled - true if cache statistic recording has been enabledTokenCacheConfiguration instance.public static TokenCacheConfiguration cacheDisabled()
public static TokenCacheConfiguration defaultConfiguration()
@Nonnull public Duration getCacheDuration()
getCacheDuration in interface CacheConfigurationpublic int getCacheSize()
getCacheSize in interface CacheConfigurationpublic Duration getTokenExpirationDelta()
public boolean isCacheStatisticsEnabled()
isCacheStatisticsEnabled in interface CacheConfigurationCopyright © 2021. All rights reserved.