public class DataKeyCache
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DataKeyCache.CacheStats
Cache statistics data class.
|
| Constructor and Description |
|---|
DataKeyCache(EncryptionConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all entries from the cache.
|
byte[] |
get(java.lang.String keyId)
Retrieves a data key from the cache.
|
DataKeyCache.CacheStats |
getStats()
Returns cache statistics.
|
void |
put(java.lang.String keyId,
byte[] dataKey)
Stores a data key in the cache.
|
void |
remove(java.lang.String keyId)
Removes a specific key from the cache.
|
void |
shutdown()
Shuts down the cache and cleans up resources.
|
public DataKeyCache(EncryptionConfig config)
public byte[] get(java.lang.String keyId)
keyId - the key identifierpublic void put(java.lang.String keyId,
byte[] dataKey)
keyId - the key identifierdataKey - the decrypted data key bytespublic void remove(java.lang.String keyId)
keyId - the key identifier to removepublic void clear()
public DataKeyCache.CacheStats getStats()
public void shutdown()