Package com.oracle.coherence.client
Class NamedCacheClient<K,V>
- java.lang.Object
-
- com.oracle.coherence.client.NamedCacheClient<K,V>
-
- Type Parameters:
K- the type of the cache keysV- the type of the cache values
- All Implemented Interfaces:
com.tangosol.net.cache.CacheMap<K,V>,com.tangosol.net.NamedCache<K,V>,com.tangosol.net.NamedCollection,com.tangosol.net.NamedMap<K,V>,com.tangosol.net.Releasable,com.tangosol.util.ConcurrentMap<K,V>,com.tangosol.util.InvocableMap<K,V>,com.tangosol.util.ObservableMap<K,V>,com.tangosol.util.QueryMap<K,V>,AutoCloseable,Map<K,V>
public class NamedCacheClient<K,V> extends Object implements com.tangosol.net.NamedCache<K,V>
Implementation of aNamedCachethat wraps anAsyncNamedCacheClient.- Since:
- 20.06
- Author:
- Jonathan Knight 2019.11.07
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.util.InvocableMap
com.tangosol.util.InvocableMap.Entry<K extends Object,V extends Object>, com.tangosol.util.InvocableMap.EntryAggregator<K extends Object,V extends Object,R extends Object>, com.tangosol.util.InvocableMap.EntryProcessor<K extends Object,V extends Object,R extends Object>, com.tangosol.util.InvocableMap.ParallelAwareAggregator<K extends Object,V extends Object,P extends Object,R extends Object>, com.tangosol.util.InvocableMap.StreamingAggregator<K extends Object,V extends Object,P extends Object,R extends Object>
-
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected AsyncNamedCacheClient<K,V>f_asyncClientThe asynchronous client.
-
Constructor Summary
Constructors Modifier Constructor Description protectedNamedCacheClient(AsyncNamedCacheClient<K,V> asyncClient)Creates aNamedCacheClientwith the specified cache name andNamedCacheGrpcClient.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,E>
voidaddIndex(com.tangosol.util.ValueExtractor<? super T,? extends E> valueExtractor, boolean sorted, Comparator<? super E> comparator)voidaddMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener)voidaddMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener, com.tangosol.util.Filter filter, boolean lite)voidaddMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener, K key, boolean lite)<R> Raggregate(com.tangosol.util.Filter filter, com.tangosol.util.InvocableMap.EntryAggregator<? super K,? super V,R> aggregator)<R> Raggregate(com.tangosol.util.InvocableMap.EntryAggregator<? super K,? super V,R> aggregator)<R> Raggregate(Collection<? extends K> keys, com.tangosol.util.InvocableMap.EntryAggregator<? super K,? super V,R> aggregator)com.tangosol.net.AsyncNamedCache<K,V>async()com.tangosol.net.AsyncNamedCache<K,V>async(com.tangosol.net.AsyncNamedMap.Option... options)voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)voiddestroy()Set<Map.Entry<K,V>>entrySet()Set<Map.Entry<K,V>>entrySet(com.tangosol.util.Filter filter)Set<Map.Entry<K,V>>entrySet(com.tangosol.util.Filter filter, Comparator comparator)Vget(Object key)Map<K,V>getAll(Collection<? extends K> keys)AsyncNamedCacheClient<K,V>getAsyncClient()Return an asynchronous version of the client.StringgetCacheName()com.tangosol.net.CacheServicegetCacheService()VgetOrDefault(Object key, V defaultValue)protected <T> ThandleCompletableFuture(CompletableFuture<T> future)protected <T> ThandleCompletableFuture(CompletableFuture<T> future, long cTimeoutMillis)<R> Rinvoke(K k, com.tangosol.util.InvocableMap.EntryProcessor<K,V,R> entryProcessor)<R> Map<K,R>invokeAll(com.tangosol.util.Filter filter, com.tangosol.util.InvocableMap.EntryProcessor<K,V,R> entryProcessor)<R> Map<K,R>invokeAll(Collection<? extends K> keys, com.tangosol.util.InvocableMap.EntryProcessor<K,V,R> entryProcessor)booleanisActive()booleanisDestroyed()booleanisEmpty()booleanisReady()booleanisReleased()Set<K>keySet()Set<K>keySet(com.tangosol.util.Filter filter)booleanlock(Object o)booleanlock(Object o, long l)Vput(K key, V value)Vput(K key, V value, long ttl)voidputAll(Map<? extends K,? extends V> m)VputIfAbsent(K key, V value)voidrelease()Vremove(Object key)booleanremove(Object key, Object value)<T,E>
voidremoveIndex(com.tangosol.util.ValueExtractor<? super T,? extends E> valueExtractor)voidremoveMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener)voidremoveMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener, com.tangosol.util.Filter filter)voidremoveMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener, K key)booleanreplace(K key, V oldValue, V newValue)intsize()StringtoString()voidtruncate()booleanunlock(Object o)Collection<V>values()Collection<V>values(com.tangosol.util.Filter filter)Collection<V>values(com.tangosol.util.Filter filter, Comparator comparator)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
f_asyncClient
protected final AsyncNamedCacheClient<K,V> f_asyncClient
The asynchronous client.
-
-
Constructor Detail
-
NamedCacheClient
protected NamedCacheClient(AsyncNamedCacheClient<K,V> asyncClient)
Creates aNamedCacheClientwith the specified cache name andNamedCacheGrpcClient.- Parameters:
asyncClient- the asynchronous client
-
-
Method Detail
-
getAsyncClient
public AsyncNamedCacheClient<K,V> getAsyncClient()
Return an asynchronous version of the client.- Returns:
- an asynchronous version of the client
-
addIndex
public <T,E> void addIndex(com.tangosol.util.ValueExtractor<? super T,? extends E> valueExtractor, boolean sorted, Comparator<? super E> comparator)
-
addMapListener
public void addMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener)
-
addMapListener
public void addMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener, K key, boolean lite)
-
addMapListener
public void addMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener, com.tangosol.util.Filter filter, boolean lite)
-
aggregate
public <R> R aggregate(Collection<? extends K> keys, com.tangosol.util.InvocableMap.EntryAggregator<? super K,? super V,R> aggregator)
-
aggregate
public <R> R aggregate(com.tangosol.util.Filter filter, com.tangosol.util.InvocableMap.EntryAggregator<? super K,? super V,R> aggregator)
-
clear
public void clear()
-
containsKey
public boolean containsKey(Object key)
-
containsValue
public boolean containsValue(Object value)
-
destroy
public void destroy()
- Specified by:
destroyin interfacecom.tangosol.net.NamedCollection
-
entrySet
public Set<Map.Entry<K,V>> entrySet(com.tangosol.util.Filter filter, Comparator comparator)
-
getAll
public Map<K,V> getAll(Collection<? extends K> keys)
-
getCacheName
public String getCacheName()
-
getCacheService
public com.tangosol.net.CacheService getCacheService()
-
invoke
public <R> R invoke(K k, com.tangosol.util.InvocableMap.EntryProcessor<K,V,R> entryProcessor)
-
invokeAll
public <R> Map<K,R> invokeAll(Collection<? extends K> keys, com.tangosol.util.InvocableMap.EntryProcessor<K,V,R> entryProcessor)
-
invokeAll
public <R> Map<K,R> invokeAll(com.tangosol.util.Filter filter, com.tangosol.util.InvocableMap.EntryProcessor<K,V,R> entryProcessor)
-
isActive
public boolean isActive()
-
isEmpty
public boolean isEmpty()
-
lock
public boolean lock(Object o, long l)
-
lock
public boolean lock(Object o)
-
release
public void release()
- Specified by:
releasein interfacecom.tangosol.net.Releasable
-
removeIndex
public <T,E> void removeIndex(com.tangosol.util.ValueExtractor<? super T,? extends E> valueExtractor)
-
removeMapListener
public void removeMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener)
-
removeMapListener
public void removeMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener, K key)
-
removeMapListener
public void removeMapListener(com.tangosol.util.MapListener<? super K,? super V> mapListener, com.tangosol.util.Filter filter)
-
size
public int size()
-
unlock
public boolean unlock(Object o)
-
aggregate
public <R> R aggregate(com.tangosol.util.InvocableMap.EntryAggregator<? super K,? super V,R> aggregator)
-
async
public com.tangosol.net.AsyncNamedCache<K,V> async(com.tangosol.net.AsyncNamedMap.Option... options)
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfacecom.tangosol.net.NamedCollection
-
isReleased
public boolean isReleased()
- Specified by:
isReleasedin interfacecom.tangosol.net.Releasable
-
values
public Collection<V> values(com.tangosol.util.Filter filter)
-
values
public Collection<V> values(com.tangosol.util.Filter filter, Comparator comparator)
-
handleCompletableFuture
protected <T> T handleCompletableFuture(CompletableFuture<T> future)
-
handleCompletableFuture
protected <T> T handleCompletableFuture(CompletableFuture<T> future, long cTimeoutMillis)
-
-