public class CachingKeyProvider extends java.lang.Object implements KeyProvider
KeyProvider
, it provides an in-memory cache for retrieving an
EncryptionKey
. This improves performance when multiple encrypted datastores are used.
This class implements the interface KeyProvider
and it can be used to create an
encrypted datastore.KeyProvider
Constructor and Description |
---|
CachingKeyProvider(KeyProvider keyProvider)
|
Modifier and Type | Method and Description |
---|---|
EncryptionKey |
getEncryptionKey() |
KeyProvider |
getKeyProvider() |
public CachingKeyProvider(KeyProvider keyProvider)
keyProvider
- The KeyProvider
to use for encrypting a datastorepublic EncryptionKey getEncryptionKey()
getEncryptionKey
in interface KeyProvider
public KeyProvider getKeyProvider()
KeyProvider
used for creating and retrieving the EncryptionKey