Package org.redisson.jcache
Class JCache<K,V>
- java.lang.Object
-
- org.redisson.RedissonObject
-
- org.redisson.jcache.JCache<K,V>
-
- Type Parameters:
K
- keyV
- value
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<javax.cache.Cache.Entry<K,V>>
,javax.cache.Cache<K,V>
,RObject
,RObjectAsync
public class JCache<K,V> extends RedissonObject implements javax.cache.Cache<K,V>
JCache implementation- Author:
- Nikita Koksharov
-
-
Field Summary
-
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor
-
-
Constructor Summary
Constructors Constructor Description JCache(JCacheManager cacheManager, Redisson redisson, String name, JCacheConfiguration<K,V> config, boolean hasOwnRedisson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
void
close()
boolean
containsKey(K key)
void
deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
V
get(K key)
Map<K,V>
getAll(Set<? extends K> keys)
V
getAndPut(K key, V value)
V
getAndRemove(K key)
V
getAndReplace(K key, V value)
javax.cache.CacheManager
getCacheManager()
<C extends javax.cache.configuration.Configuration<K,V>>
CgetConfiguration(Class<C> clazz)
<T> T
invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments)
<T> Map<K,javax.cache.processor.EntryProcessorResult<T>>
invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments)
boolean
isClosed()
Iterator<javax.cache.Cache.Entry<K,V>>
iterator()
protected Iterator<K>
keyIterator()
void
loadAll(Set<? extends K> keys, boolean replaceExistingValues, javax.cache.integration.CompletionListener completionListener)
void
put(K key, V value)
void
putAll(Map<? extends K,? extends V> map)
boolean
putIfAbsent(K key, V value)
void
registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
boolean
remove(K key)
boolean
remove(K key, V value)
void
removeAll()
void
removeAll(Set<? extends K> keys)
boolean
replace(K key, V value)
boolean
replace(K key, V oldValue, V newValue)
<T> T
unwrap(Class<T> clazz)
-
Methods inherited from class org.redisson.RedissonObject
await, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, touch, touchAsync, unlink, unlinkAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
JCache
public JCache(JCacheManager cacheManager, Redisson redisson, String name, JCacheConfiguration<K,V> config, boolean hasOwnRedisson)
-
-
Method Detail
-
containsKey
public boolean containsKey(K key)
-
loadAll
public void loadAll(Set<? extends K> keys, boolean replaceExistingValues, javax.cache.integration.CompletionListener completionListener)
-
getConfiguration
public <C extends javax.cache.configuration.Configuration<K,V>> C getConfiguration(Class<C> clazz)
-
invoke
public <T> T invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments) throws javax.cache.processor.EntryProcessorException
-
invokeAll
public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments)
-
getCacheManager
public javax.cache.CacheManager getCacheManager()
-
close
public void close()
-
unwrap
public <T> T unwrap(Class<T> clazz)
-
registerCacheEntryListener
public void registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
-
deregisterCacheEntryListener
public void deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
-
-