public class IgniteCacheProxyImpl<K,V> extends Object implements IgniteCacheProxy<K,V>
IgniteCacheProxy
that provides access to Ignite cache through IgniteCache
instance.Constructor and Description |
---|
IgniteCacheProxyImpl(IgniteCache<K,V> cache) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the contents of the cache.
|
boolean |
containsKey(K key)
Determines if the
ClientCache contains an entry for the specified key. |
IgniteCache<K,V> |
delegate() |
V |
get(K key)
Gets an entry from the cache.
|
Map<K,V> |
getAll(Set<? extends K> keys)
Gets a collection of entries from the Ignite cache, returning them as
Map of the values associated with the set of keys requested. |
@NotNull Iterator<javax.cache.Cache.Entry<K,V>> |
iterator() |
void |
put(K key,
V val)
Associates the specified value with the specified key in the cache.
|
void |
putAll(Map<? extends K,? extends V> map)
Copies all of the entries from the specified map to the Ignite cache.
|
<R> QueryCursor<R> |
query(Query<R> qry)
Execute SQL query and get cursor to iterate over results.
|
boolean |
remove(K key)
Removes the mapping for a key from this cache if it is present.
|
void |
removeAll(Set<? extends K> keys)
Removes entries for the specified keys.
|
int |
size(CachePeekMode... peekModes)
Gets the number of all entries cached across all nodes.
|
IgniteCacheProxy<K,V> |
withExpiryPolicy(javax.cache.expiry.ExpiryPolicy expirePlc)
Returns cache with the specified expired policy set.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public IgniteCacheProxyImpl(IgniteCache<K,V> cache)
public V get(K key) throws ClientException
get
in interface IgniteCacheProxy<K,V>
key
- the key whose associated value is to be returnedClientException
public void put(K key, V val) throws ClientException
put
in interface IgniteCacheProxy<K,V>
key
- key with which the specified value is to be associatedval
- value to be associated with the specified key.ClientException
public int size(CachePeekMode... peekModes) throws ClientException
size
in interface IgniteCacheProxy<K,V>
peekModes
- Optional peek modes. If not provided, then total cache size is returned.ClientException
public Map<K,V> getAll(Set<? extends K> keys) throws ClientException
Map
of the values associated with the set of keys requested.getAll
in interface IgniteCacheProxy<K,V>
keys
- The keys whose associated values are to be returned.ClientException
public void putAll(Map<? extends K,? extends V> map) throws ClientException
putAll
in interface IgniteCacheProxy<K,V>
map
- Mappings to be stored in this cache.ClientException
public boolean remove(K key) throws ClientException
remove
in interface IgniteCacheProxy<K,V>
key
- Key whose mapping is to be removed from the cache.ClientException
public void removeAll(Set<? extends K> keys) throws ClientException
removeAll
in interface IgniteCacheProxy<K,V>
keys
- The keys to remove.ClientException
public void clear() throws ClientException
clear
in interface IgniteCacheProxy<K,V>
ClientException
public IgniteCacheProxy<K,V> withExpiryPolicy(javax.cache.expiry.ExpiryPolicy expirePlc)
withExpiryPolicy
in interface IgniteCacheProxy<K,V>
public <R> QueryCursor<R> query(Query<R> qry)
query
in interface IgniteCacheProxy<K,V>
qry
- SQL query.public boolean containsKey(K key)
ClientCache
contains an entry for the specified key.containsKey
in interface IgniteCacheProxy<K,V>
key
- key whose presence in this cache is to be tested.public IgniteCache<K,V> delegate()
IgniteCache
instance to which operations are delegated.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024