public class SecretCacheConfiguration extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_CACHE_ITEM_TTL
The default TTL for an item stored in cache before access causing a refresh.
|
static int |
DEFAULT_MAX_CACHE_SIZE
The default cache size.
|
static String |
DEFAULT_VERSION_STAGE
The default version stage to use when retrieving secret values.
|
| Constructor and Description |
|---|
SecretCacheConfiguration()
Default constructor for the SecretCacheConfiguration object.
|
| Modifier and Type | Method and Description |
|---|---|
SecretCacheHook |
getCacheHook()
Returns the interface used to hook in-memory cache updates.
|
long |
getCacheItemTTL()
Returns the TTL for the cached items.
|
com.amazonaws.services.secretsmanager.AWSSecretsManager |
getClient()
Returns the AWS Secrets Manager client that is used for requesting secret values.
|
int |
getMaxCacheSize()
Returns the max cache size that should be used for creating the cache.
|
String |
getVersionStage()
Returns the version stage that is used for requesting secret values.
|
void |
setCacheHook(SecretCacheHook cacheHook)
Sets the interface used to hook the in-memory cache.
|
void |
setCacheItemTTL(long cacheItemTTL)
Sets the TTL in milliseconds for the cached items.
|
void |
setClient(com.amazonaws.services.secretsmanager.AWSSecretsManager client)
Sets the AWS Secrets Manager client that should be used by the cache for requesting
secrets.
|
void |
setMaxCacheSize(int maxCacheSize)
Sets the max cache size.
|
void |
setVersionStage(String versionStage)
Sets the version stage that should be used for requesting secret values
from AWS Secrets Manager
|
SecretCacheConfiguration |
withCacheHook(SecretCacheHook cacheHook)
Sets the interface used to hook the in-memory cache.
|
SecretCacheConfiguration |
withCacheItemTTL(long cacheItemTTL)
Sets the TTL in milliseconds for the cached items.
|
SecretCacheConfiguration |
withClient(com.amazonaws.services.secretsmanager.AWSSecretsManager client)
Sets the AWS Secrets Manager client that should be used by the cache for requesting
secrets.
|
SecretCacheConfiguration |
withMaxCacheSize(int maxCacheSize)
Sets the max cache size.
|
SecretCacheConfiguration |
withVersionStage(String versionStage)
Sets the version stage that should be used for requesting secret values
from AWS Secrets Manager
|
public static final int DEFAULT_MAX_CACHE_SIZE
public static final long DEFAULT_CACHE_ITEM_TTL
public static final String DEFAULT_VERSION_STAGE
public SecretCacheConfiguration()
public com.amazonaws.services.secretsmanager.AWSSecretsManager getClient()
public void setClient(com.amazonaws.services.secretsmanager.AWSSecretsManager client)
client - The AWS Secrets Manager client.public SecretCacheConfiguration withClient(com.amazonaws.services.secretsmanager.AWSSecretsManager client)
client - The AWS Secrets Manager client.public SecretCacheHook getCacheHook()
public void setCacheHook(SecretCacheHook cacheHook)
cacheHook - The interface used to hook the in-memory cache.public SecretCacheConfiguration withCacheHook(SecretCacheHook cacheHook)
cacheHook - The interface used to hook in-memory cache.public int getMaxCacheSize()
public void setMaxCacheSize(int maxCacheSize)
maxCacheSize - The max cache size.public SecretCacheConfiguration withMaxCacheSize(int maxCacheSize)
maxCacheSize - The max cache size.public long getCacheItemTTL()
public void setCacheItemTTL(long cacheItemTTL)
cacheItemTTL - The TTL for cached items before requiring a refresh.public SecretCacheConfiguration withCacheItemTTL(long cacheItemTTL)
cacheItemTTL - The TTL for cached items before requiring a refresh.public String getVersionStage()
public void setVersionStage(String versionStage)
versionStage - The version stage used for requesting secret values.public SecretCacheConfiguration withVersionStage(String versionStage)
versionStage - The version stage used for requesting secret values.Copyright © 2018. All rights reserved.