Class CachedEncryptionKeyProvider.CachedEncryptionKeyProviderBuilder
java.lang.Object
de.otto.kafka.messaging.e2ee.vault.CachedEncryptionKeyProvider.CachedEncryptionKeyProviderBuilder
- Enclosing class:
CachedEncryptionKeyProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()cacheStorage(SecondLevelCacheStorage cacheStorage) cachingDuration(Duration cachingDuration) maxCacheSize(Integer maxCacheSize) realEncryptionKeyProvider(EncryptionKeyProvider realEncryptionKeyProvider)
-
Constructor Details
-
CachedEncryptionKeyProviderBuilder
public CachedEncryptionKeyProviderBuilder()
-
-
Method Details
-
realEncryptionKeyProvider
public CachedEncryptionKeyProvider.CachedEncryptionKeyProviderBuilder realEncryptionKeyProvider(EncryptionKeyProvider realEncryptionKeyProvider) - Parameters:
realEncryptionKeyProvider- the real EncryptionKeyProvider- Returns:
- this
-
cacheStorage
public CachedEncryptionKeyProvider.CachedEncryptionKeyProviderBuilder cacheStorage(SecondLevelCacheStorage cacheStorage) - Parameters:
cacheStorage- the second level cache storage interface- Returns:
- this
-
clock
- Parameters:
clock- a clock (set that for tests only)- Returns:
- this
-
cachingDuration
public CachedEncryptionKeyProvider.CachedEncryptionKeyProviderBuilder cachingDuration(Duration cachingDuration) - Parameters:
cachingDuration- the cache duration for the encryption keys. The decryption keys will never expire.- Returns:
- this
-
maxCacheSize
public CachedEncryptionKeyProvider.CachedEncryptionKeyProviderBuilder maxCacheSize(Integer maxCacheSize) - Parameters:
maxCacheSize- the maximum allowed size (number of characters) of the cache storage - must be at least 500- Returns:
- this
-
build
- Returns:
- the built CachedEncryptionKeyProvider
-