public class NullCryptoMaterialsCache extends Object implements CryptoMaterialsCache
CryptoMaterialsCache that doesn't actually cache anything.CryptoMaterialsCache.CacheHint, CryptoMaterialsCache.DecryptCacheEntry, CryptoMaterialsCache.EncryptCacheEntry, CryptoMaterialsCache.UsageStats| Constructor and Description |
|---|
NullCryptoMaterialsCache() |
| Modifier and Type | Method and Description |
|---|---|
CryptoMaterialsCache.DecryptCacheEntry |
getEntryForDecrypt(byte[] cacheId)
Searches for an entry in the encrypt cache matching a particular cache identifier, and returns one if found.
|
CryptoMaterialsCache.EncryptCacheEntry |
getEntryForEncrypt(byte[] cacheId,
CryptoMaterialsCache.UsageStats usageIncrement)
Searches for an entry in the encrypt cache matching a particular cache identifier, and returns one if found.
|
void |
putEntryForDecrypt(byte[] cacheId,
DecryptionMaterials decryptionMaterials,
CryptoMaterialsCache.CacheHint hint)
Adds a new entry to the decrypt cache.
|
CryptoMaterialsCache.EncryptCacheEntry |
putEntryForEncrypt(byte[] cacheId,
EncryptionMaterials encryptionMaterials,
CryptoMaterialsCache.CacheHint hint,
CryptoMaterialsCache.UsageStats initialUsage)
Attempts to add a new entry to the encrypt cache to be returned on subsequent
CryptoMaterialsCache.getEntryForEncrypt(byte[], UsageStats) calls. |
public CryptoMaterialsCache.EncryptCacheEntry getEntryForEncrypt(byte[] cacheId, CryptoMaterialsCache.UsageStats usageIncrement)
CryptoMaterialsCachegetEntryForEncrypt in interface CryptoMaterialsCachecacheId - The identifier for the item in the cacheusageIncrement - The amount of usage to atomically add to the returned entry. This usage increment must be
reflected in the getUsageStats() method on the returned cache entry.public CryptoMaterialsCache.EncryptCacheEntry putEntryForEncrypt(byte[] cacheId, EncryptionMaterials encryptionMaterials, CryptoMaterialsCache.CacheHint hint, CryptoMaterialsCache.UsageStats initialUsage)
CryptoMaterialsCacheCryptoMaterialsCache.getEntryForEncrypt(byte[], UsageStats) calls.
In the event that an error occurs when adding the entry to the cache, this function shall still return a
EncryptCacheEntry instance, which shall act as if the cache entry was immediately evicted and/or invalidated.putEntryForEncrypt in interface CryptoMaterialsCachecacheId - The identifier for the item in the cacheencryptionMaterials - The EncryptionMaterials to associate with this new entryinitialUsage - The initial usage stats for the cache entrypublic CryptoMaterialsCache.DecryptCacheEntry getEntryForDecrypt(byte[] cacheId)
CryptoMaterialsCachegetEntryForDecrypt in interface CryptoMaterialsCachecacheId - The identifier for the item in the cachepublic void putEntryForDecrypt(byte[] cacheId,
DecryptionMaterials decryptionMaterials,
CryptoMaterialsCache.CacheHint hint)
CryptoMaterialsCacheputEntryForDecrypt in interface CryptoMaterialsCachecacheId - The identifier for the item in the cachedecryptionMaterials - The DecryptionMaterials to associate with the new entry.Copyright © 2018. All rights reserved.