@Experimental public abstract class AbstractCache extends java.lang.Object implements Cache
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCache(int maximumSize) |
protected |
AbstractCache(int maximumSize,
Cacheable cacheable) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
clearStore() |
boolean |
compatibilityMode() |
protected abstract boolean |
containsKeyInStore(CacheKey cacheKey) |
boolean |
delete(CacheKey cacheKey)
Delete an entry by cache key
|
java.util.List<java.lang.Boolean> |
delete(java.util.List<CacheKey> cacheKeys)
Delete entries by cache key from the cache
|
java.util.List<CacheKey> |
deleteByRedisKey(java.lang.Object key)
Delete an entry by the Redis key from the cache
|
java.util.List<CacheKey> |
deleteByRedisKeys(java.util.List keys)
Delete entries by the Redis key from the cache
|
int |
flush()
Flushes the entire cache
|
CacheEntry |
get(CacheKey cacheKey)
Fetches a value from the cache
|
CacheStats |
getAndResetStats() |
abstract java.util.Collection<CacheEntry> |
getCacheEntries() |
abstract EvictionPolicy |
getEvictionPolicy() |
protected abstract CacheEntry |
getFromStore(CacheKey cacheKey) |
int |
getMaxSize() |
abstract int |
getSize() |
CacheStats |
getStats() |
boolean |
hasCacheKey(CacheKey cacheKey) |
boolean |
isCacheable(CacheKey cacheKey) |
protected abstract CacheEntry |
putIntoStore(CacheKey cacheKey,
CacheEntry entry) |
protected abstract boolean |
removeFromStore(CacheKey cacheKey) |
CacheEntry |
set(CacheKey cacheKey,
CacheEntry entry)
Puts a value into the cache
|
protected AbstractCache(int maximumSize)
protected AbstractCache(int maximumSize,
Cacheable cacheable)
public int getMaxSize()
getMaxSize in interface Cachepublic abstract int getSize()
public abstract java.util.Collection<CacheEntry> getCacheEntries()
getCacheEntries in interface Cachepublic CacheEntry get(CacheKey cacheKey)
Cachepublic CacheEntry set(CacheKey cacheKey, CacheEntry entry)
Cachepublic boolean delete(CacheKey cacheKey)
Cachepublic java.util.List<java.lang.Boolean> delete(java.util.List<CacheKey> cacheKeys)
Cachepublic java.util.List<CacheKey> deleteByRedisKey(java.lang.Object key)
CachedeleteByRedisKey in interface Cachekey - The Redis key as binarypublic java.util.List<CacheKey> deleteByRedisKeys(java.util.List keys)
CachedeleteByRedisKeys in interface Cachekeys - The Redis keys as binariespublic int flush()
Cachepublic boolean isCacheable(CacheKey cacheKey)
isCacheable in interface CachecacheKey - The key of the cache entrypublic boolean hasCacheKey(CacheKey cacheKey)
hasCacheKey in interface CachecacheKey - The key of the cache entrypublic abstract EvictionPolicy getEvictionPolicy()
getEvictionPolicy in interface Cachepublic CacheStats getStats()
public CacheStats getAndResetStats()
getAndResetStats in interface Cachepublic boolean compatibilityMode()
compatibilityMode in interface Cacheprotected abstract CacheEntry getFromStore(CacheKey cacheKey)
protected abstract CacheEntry putIntoStore(CacheKey cacheKey, CacheEntry entry)
protected abstract boolean removeFromStore(CacheKey cacheKey)
protected abstract void clearStore()
protected abstract boolean containsKeyInStore(CacheKey cacheKey)
Copyright © 2025. All rights reserved.