public class Ehcache<K,V> extends EhcacheBase<K,V>
Cache
interface when no CacheLoaderWriter
is involved.
Ehcache
users should not have to depend on this type but rely exclusively on the api types in package
org.ehcache
.
Modifier and Type | Class and Description |
---|---|
static class |
Ehcache.GetAllFunction<K,V> |
static class |
Ehcache.PutAllFunction<K,V> |
static class |
Ehcache.RemoveAllFunction<K,V> |
EhcacheBase.Jsr107CacheBase
Cache.Entry<K,V>
bulkMethodEntries, clearObserver, conditionalRemoveObserver, getAllObserver, getObserver, logger, putAllObserver, putIfAbsentObserver, putObserver, removeAllObserver, removeObserver, replaceObserver, resilienceStrategy, runtimeConfiguration, statusTransitioner, store
Constructor and Description |
---|
Ehcache(CacheConfiguration<K,V> configuration,
Store<K,V> store,
ResilienceStrategy<K,V> resilienceStrategy,
CacheEventDispatcher<K,V> eventDispatcher,
org.slf4j.Logger logger)
Creates a new
Ehcache based on the provided parameters. |
Ehcache(CacheConfiguration<K,V> configuration,
Store<K,V> store,
ResilienceStrategy<K,V> resilienceStrategy,
CacheEventDispatcher<K,V> eventDispatcher,
org.slf4j.Logger logger,
CacheLoaderWriter<? super K,V> cacheLoaderWriter) |
Modifier and Type | Method and Description |
---|---|
Jsr107Cache<K,V> |
createJsr107Cache()
Jsr107Cache
|
protected Store.ValueHolder<V> |
doGet(K key) |
protected java.util.Map<K,V> |
doGetAllInternal(java.util.Set<? extends K> keys,
boolean includeNulls) |
protected Store.PutStatus |
doPut(K key,
V value) |
void |
doPutAll(java.util.Map<? extends K,? extends V> entries) |
Store.ValueHolder<V> |
doPutIfAbsent(K key,
V value,
java.util.function.Consumer<java.lang.Boolean> put) |
protected Store.RemoveStatus |
doRemove(K key,
V value) |
protected void |
doRemoveAll(java.util.Set<? extends K> keys) |
protected boolean |
doRemoveInternal(K key) |
protected V |
doReplace(K key,
V value) |
protected Store.ReplaceStatus |
doReplace(K key,
V oldValue,
V newValue) |
CacheLoaderWriter<? super K,V> |
getCacheLoaderWriter()
CacheLoaderWriter
|
addBulkMethodEntriesCount, addHook, checkNonNull, checkNonNull, checkNonNullContent, clear, close, containsKey, get, getAll, getAllInternal, getBulkMethodEntries, getNoLoader, getRuntimeConfiguration, getStatus, init, iterator, newValueAlreadyExpired, newValueAlreadyExpired, put, putAll, putIfAbsent, remove, remove, removeAll, removeInternal, replace, replace
public Ehcache(CacheConfiguration<K,V> configuration, Store<K,V> store, ResilienceStrategy<K,V> resilienceStrategy, CacheEventDispatcher<K,V> eventDispatcher, org.slf4j.Logger logger)
Ehcache
based on the provided parameters.configuration
- the cache configurationstore
- the store to useeventDispatcher
- the event dispatcherlogger
- the loggerpublic Ehcache(CacheConfiguration<K,V> configuration, Store<K,V> store, ResilienceStrategy<K,V> resilienceStrategy, CacheEventDispatcher<K,V> eventDispatcher, org.slf4j.Logger logger, CacheLoaderWriter<? super K,V> cacheLoaderWriter)
protected Store.ValueHolder<V> doGet(K key) throws StoreAccessException
doGet
in class EhcacheBase<K,V>
StoreAccessException
protected Store.PutStatus doPut(K key, V value) throws StoreAccessException
doPut
in class EhcacheBase<K,V>
StoreAccessException
protected boolean doRemoveInternal(K key) throws StoreAccessException
doRemoveInternal
in class EhcacheBase<K,V>
StoreAccessException
protected java.util.Map<K,V> doGetAllInternal(java.util.Set<? extends K> keys, boolean includeNulls) throws StoreAccessException
doGetAllInternal
in class EhcacheBase<K,V>
StoreAccessException
public void doPutAll(java.util.Map<? extends K,? extends V> entries) throws StoreAccessException
doPutAll
in class EhcacheBase<K,V>
StoreAccessException
protected void doRemoveAll(java.util.Set<? extends K> keys) throws BulkCacheWritingException, StoreAccessException
doRemoveAll
in class EhcacheBase<K,V>
BulkCacheWritingException
StoreAccessException
public Store.ValueHolder<V> doPutIfAbsent(K key, V value, java.util.function.Consumer<java.lang.Boolean> put) throws StoreAccessException
doPutIfAbsent
in class EhcacheBase<K,V>
StoreAccessException
protected Store.RemoveStatus doRemove(K key, V value) throws StoreAccessException
doRemove
in class EhcacheBase<K,V>
StoreAccessException
protected V doReplace(K key, V value) throws StoreAccessException
doReplace
in class EhcacheBase<K,V>
StoreAccessException
protected Store.ReplaceStatus doReplace(K key, V oldValue, V newValue) throws StoreAccessException
doReplace
in class EhcacheBase<K,V>
StoreAccessException
public Jsr107Cache<K,V> createJsr107Cache()
InternalCache
public CacheLoaderWriter<? super K,V> getCacheLoaderWriter()