public interface GridCacheProjectionEx<K,V> extends CacheProjection<K,V>
| Modifier and Type | Method and Description |
|---|---|
GridCacheContext<K,V> |
context() |
Set<javax.cache.Cache.Entry<K,V>> |
entrySetx(CacheEntryPredicate... filter)
Gets entry set containing internal entries.
|
javax.cache.expiry.ExpiryPolicy |
expiry() |
GridCacheProjectionEx<K,V> |
forSubjectId(UUID subjId)
Creates projection for specified subject ID.
|
V |
get(K key,
GridCacheEntryEx entry,
boolean deserializePortable,
CacheEntryPredicate... filter) |
Map<K,V> |
getAllOutTx(List<K> keys)
Gets values from cache.
|
IgniteInternalFuture<Map<K,V>> |
getAllOutTxAsync(List<K> keys)
Asynchronously gets values from cache.
|
V |
getForcePrimary(K key)
Gets value from cache.
|
IgniteInternalFuture<V> |
getForcePrimaryAsync(K key)
Asynchronously gets value from cache.
|
long |
igfsDataSpaceMax()
Get maximum space available for IGFS.
|
long |
igfsDataSpaceUsed()
Get current amount of used IGFS space in bytes.
|
<T> javax.cache.processor.EntryProcessorResult<T> |
invoke(K key,
javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
Object... args) |
<T> Map<K,javax.cache.processor.EntryProcessorResult<T>> |
invokeAll(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map,
Object... args) |
<T> Map<K,javax.cache.processor.EntryProcessorResult<T>> |
invokeAll(Set<? extends K> keys,
javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
Object... args) |
<T> IgniteInternalFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> |
invokeAllAsync(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map,
Object... args) |
<T> IgniteInternalFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> |
invokeAllAsync(Set<? extends K> keys,
javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
Object... args) |
<T> IgniteInternalFuture<javax.cache.processor.EntryProcessorResult<T>> |
invokeAsync(K key,
javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
Object... args) |
boolean |
isIgfsDataCache()
Checks whether this cache is IGFS data cache.
|
boolean |
isMongoDataCache()
Checks whether this cache is Mongo data cache.
|
boolean |
isMongoMetaCache()
Checks whether this cache is Mongo meta cache.
|
void |
localLoadCache(IgniteBiPredicate<K,V> p,
Object... args)
Delegates to
CacheStore.loadCache(org.apache.ignite.lang.IgniteBiInClosure,Object...) method
to load state from the underlying persistent storage. |
IgniteInternalFuture<?> |
localLoadCacheAsync(IgniteBiPredicate<K,V> p,
Object... args)
Asynchronously delegates to
CacheStore.loadCache(org.apache.ignite.lang.IgniteBiInClosure, Object...) method
to reload state from the underlying persistent storage. |
CacheEntryPredicate |
predicate()
Gets predicate on which this projection is based on or
null
if predicate is not defined. |
Set<javax.cache.Cache.Entry<K,V>> |
primaryEntrySetx(CacheEntryPredicate... filter)
Gets set of primary entries containing internal entries.
|
V |
put(K key,
V val,
GridCacheEntryEx entry,
long ttl,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
void |
putAllConflict(Map<KeyCacheObject,GridCacheDrInfo> drMap)
Store DR data.
|
IgniteInternalFuture<?> |
putAllConflictAsync(Map<KeyCacheObject,GridCacheDrInfo> drMap)
Store DR data asynchronously.
|
IgniteInternalFuture<V> |
putAsync(K key,
V val,
GridCacheEntryEx entry,
long ttl,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
boolean |
putx(K key,
V val,
GridCacheEntryEx entry,
long ttl,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
IgniteInternalFuture<Boolean> |
putxAsync(K key,
V val,
GridCacheEntryEx entry,
long ttl,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
V |
remove(K key,
GridCacheEntryEx entry,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
void |
removeAllConflict(Map<KeyCacheObject,GridCacheVersion> drMap)
Removes DR data.
|
IgniteInternalFuture<?> |
removeAllConflictAsync(Map<KeyCacheObject,GridCacheVersion> drMap)
Removes DR data asynchronously.
|
IgniteInternalFuture<V> |
removeAsync(K key,
GridCacheEntryEx entry,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
boolean |
removex(K key,
GridCacheEntryEx entry,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
GridCacheReturn |
removex(K key,
V val)
Removes given key mapping from cache if one exists and value is equal to the passed in value.
|
IgniteInternalFuture<Boolean> |
removexAsync(K key,
GridCacheEntryEx entry,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
IgniteInternalFuture<GridCacheReturn> |
removexAsync(K key,
V val)
Asynchronously removes given key mapping from cache if one exists and value is equal to the passed in value.
|
GridCacheReturn |
replacex(K key,
V oldVal,
V newVal)
Stores given key-value pair in cache only if only if the previous value is equal to the
'oldVal' passed in. |
IgniteInternalFuture<GridCacheReturn> |
replacexAsync(K key,
V oldVal,
V newVal)
Asynchronously stores given key-value pair in cache only if only if the previous value is equal to the
'oldVal' passed in. |
GridCacheProjectionEx<K,V> |
withExpiryPolicy(javax.cache.expiry.ExpiryPolicy plc) |
cache, clear, clear, clear, clearAll, clearAsync, clearAsync, clearAsync, clearLocally, clearLocally, clearLocallyAll, containsKey, containsKeyAsync, containsKeys, containsKeysAsync, containsValue, entry, entrySet, entrySet, evict, evictAll, evictAll, flags, flagsOff, flagsOn, get, getAll, getAllAsync, getAsync, globalPrimarySize, globalSize, gridProjection, isEmpty, isLocked, isLockedByThread, keepPortable, keySet, keySet, localEntries, localPeek, localRemoveAll, localSize, lock, lockAll, lockAllAsync, lockAsync, name, nearSize, peek, peek, primaryEntrySet, primaryKeySet, primarySize, primaryValues, projection, projection, promote, promoteAll, put, putAll, putAllAsync, putAsync, putIfAbsent, putIfAbsentAsync, putx, putxAsync, putxIfAbsent, putxIfAbsentAsync, queries, reload, reloadAsync, remove, remove, removeAll, removeAll, removeAllAsync, removeAllAsync, removeAsync, removeAsync, removex, removexAsync, replace, replace, replaceAsync, replaceAsync, replacex, replacexAsync, size, size, sizeAsync, toMap, tx, txStart, txStart, txStart, txStartEx, unlock, unlockAll, valuesGridCacheProjectionEx<K,V> forSubjectId(UUID subjId)
subjId - Client ID.@Nullable CacheEntryPredicate predicate()
null
if predicate is not defined.@Nullable V put(K key, V val, @Nullable GridCacheEntryEx entry, long ttl, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException
GridCacheEntryImpl.key - Key.val - Value.entry - Cached entry. If not provided, equivalent to {CacheProjection#put}.ttl - Optional time-to-live. If negative, leaves ttl value unchanged.filter - Optional filter.IgniteCheckedException - If failed.IgniteInternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx entry, long ttl, @Nullable CacheEntryPredicate... filter)
GridCacheEntryImpl.key - Key.val - Value.entry - Optional cached entry.ttl - Optional time-to-live value. If negative, leaves ttl value unchanged.filter - Optional filter.boolean putx(K key, V val, @Nullable GridCacheEntryEx entry, long ttl, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException
GridCacheEntryImpl.key - Key.val - Value.entry - Cached entry. If not provided, equivalent to {CacheProjection#put}.ttl - Optional time-to-live. If negative, leaves ttl value unchanged.filter - Optional filter.IgniteCheckedException - If failed.IgniteInternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx entry, long ttl, @Nullable CacheEntryPredicate... filter)
GridCacheEntryImpl.key - Key.val - Value.entry - Cached entry. If not provided, equivalent to {CacheProjection#put}.ttl - Optional time-to-live. If negative, leave ttl value unchanged.filter - Optional filter.void putAllConflict(Map<KeyCacheObject,GridCacheDrInfo> drMap) throws IgniteCheckedException
drMap - DR map.IgniteCheckedException - If put operation failed.CacheFlagException - If projection flags validation failed.IgniteInternalFuture<?> putAllConflictAsync(Map<KeyCacheObject,GridCacheDrInfo> drMap) throws IgniteCheckedException
drMap - DR map.IgniteCheckedException - If put operation failed.CacheFlagException - If projection flags validation failed.@Nullable V remove(K key, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException
GridCacheEntryImpl.key - Key to remove.entry - Cached entry. If not provided, equivalent to {CacheProjection#put}.filter - Optional filter.IgniteCheckedException - If failed.IgniteInternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter)
GridCacheEntryImpl.key - Key to remove.entry - Optional cached entry.filter - Optional filter.void removeAllConflict(Map<KeyCacheObject,GridCacheVersion> drMap) throws IgniteCheckedException
drMap - DR map.IgniteCheckedException - If remove failed.CacheFlagException - If projection flags validation failed.IgniteInternalFuture<?> removeAllConflictAsync(Map<KeyCacheObject,GridCacheVersion> drMap) throws IgniteCheckedException
drMap - DR map.IgniteCheckedException - If remove failed.CacheFlagException - If projection flags validation failed.boolean removex(K key, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException
GridCacheEntryImpl.key - Key to remove.entry - Cached entry. If not provided, equivalent to {CacheProjection#put}.filter - Optional filter.IgniteCheckedException - If failed.IgniteInternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter)
GridCacheEntryImpl.key - Key to remove.entry - Cached entry. If not provided, equivalent to {CacheProjection#put}.filter - Optional filter.IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal)
'oldVal' passed in.
This method will return true if value is stored in cache and false otherwise.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.key - Key to store in cache.oldVal - Old value to match.newVal - Value to be associated with the given key.NullPointerException - If either key or value are null.CacheFlagException - If projection flags validation failed.GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException
'oldVal' passed in.
This method will return true if value is stored in cache and false otherwise.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.key - Key to store in cache.oldVal - Old value to match.newVal - Value to be associated with the given key.NullPointerException - If either key or value are null.IgniteCheckedException - If replace operation failed.CacheFlagException - If projection flags validation failed.GridCacheReturn removex(K key, V val) throws IgniteCheckedException
If write-through is enabled, the value will be removed from CacheStore
via CacheStore#remove(Transaction, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.key - Key whose mapping is to be removed from cache.val - Value to match against currently cached value.NullPointerException - if the key or value is null.IgniteCheckedException - If remove failed.CacheFlagException - If projection flags validation failed.IgniteInternalFuture<GridCacheReturn> removexAsync(K key, V val)
This method will return true if remove did occur, which means that all optionally
provided filters have passed and there was something to remove, false otherwise.
If write-through is enabled, the value will be removed from CacheStore
via CacheStore#remove(Transaction, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.key - Key whose mapping is to be removed from cache.val - Value to match against currently cached value.NullPointerException - if the key or value is null.CacheFlagException - If projection flags validation failed.@Nullable V get(K key, @Nullable GridCacheEntryEx entry, boolean deserializePortable, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException
key - Key to retrieve the value for.entry - Cached entry when called from entry wrapper.filter - Filter to check prior to getting the value. Note that filter check
together with getting the value is an atomic operation.IgniteCheckedException - If failed.@Nullable V getForcePrimary(K key) throws IgniteCheckedException
key - Key to get value for.IgniteCheckedException - If failed.IgniteInternalFuture<V> getForcePrimaryAsync(K key)
key - Key to get value for.@Nullable Map<K,V> getAllOutTx(List<K> keys) throws IgniteCheckedException
keys - Keys to get values for.IgniteCheckedException - If failed.IgniteInternalFuture<Map<K,V>> getAllOutTxAsync(List<K> keys)
keys - Keys to get values for.boolean isIgfsDataCache()
True in case this cache is IGFS data cache.long igfsDataSpaceUsed()
long igfsDataSpaceMax()
boolean isMongoDataCache()
True if this cache is mongo data cache.boolean isMongoMetaCache()
True if this cache is mongo meta cache.Set<javax.cache.Cache.Entry<K,V>> entrySetx(CacheEntryPredicate... filter)
filter - Filter.Set<javax.cache.Cache.Entry<K,V>> primaryEntrySetx(CacheEntryPredicate... filter)
filter - Optional filter.@Nullable javax.cache.expiry.ExpiryPolicy expiry()
ExpiryPolicy associated with this projection.GridCacheProjectionEx<K,V> withExpiryPolicy(javax.cache.expiry.ExpiryPolicy plc)
plc - ExpiryPolicy to associate with this projection.@Nullable <T> javax.cache.processor.EntryProcessorResult<T> invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args) throws IgniteCheckedException
key - Key.entryProcessor - Entry processor.args - Arguments.IgniteCheckedException - If failed.<T> IgniteInternalFuture<javax.cache.processor.EntryProcessorResult<T>> invokeAsync(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args)
key - Key.entryProcessor - Entry processor.args - Arguments.<T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args) throws IgniteCheckedException
keys - Keys.entryProcessor - Entry processor.args - Arguments.IgniteCheckedException - If failed.<T> IgniteInternalFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> invokeAllAsync(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args)
keys - Keys.entryProcessor - Entry processor.args - Arguments.<T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map, Object... args) throws IgniteCheckedException
map - Map containing keys and entry processors to be applied to values.args - Arguments.IgniteCheckedException - If failed.<T> IgniteInternalFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> invokeAllAsync(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map, Object... args)
map - Map containing keys and entry processors to be applied to values.args - Arguments.GridCacheContext<K,V> context()
void localLoadCache(@Nullable IgniteBiPredicate<K,V> p, @Nullable Object... args) throws IgniteCheckedException
CacheStore.loadCache(org.apache.ignite.lang.IgniteBiInClosure,Object...) method
to load state from the underlying persistent storage. The loaded values
will then be given to the optionally passed in predicate, and, if the predicate returns
true, will be stored in cache. If predicate is null, then
all loaded values will be stored in cache.
Note that this method does not receive keys as a parameter, so it is up to
CacheStore implementation to provide all the data to be loaded.
This method is not transactional and may end up loading a stale value into cache if another thread has updated the value immediately after it has been loaded. It is mostly useful when pre-loading the cache from underlying data store before start, or for read-only caches.
p - Optional predicate (may be null). If provided, will be used to
filter values to be put into cache.args - Optional user arguments to be passed into
CacheStore.loadCache(org.apache.ignite.lang.IgniteBiInClosure, Object...) method.IgniteCheckedException - If loading failed.IgniteInternalFuture<?> localLoadCacheAsync(@Nullable IgniteBiPredicate<K,V> p, @Nullable Object... args)
CacheStore.loadCache(org.apache.ignite.lang.IgniteBiInClosure, Object...) method
to reload state from the underlying persistent storage. The reloaded values
will then be given to the optionally passed in predicate, and if the predicate returns
true, will be stored in cache. If predicate is null, then
all reloaded values will be stored in cache.
Note that this method does not receive keys as a parameter, so it is up to
CacheStore implementation to provide all the data to be loaded.
This method is not transactional and may end up loading a stale value into cache if another thread has updated the value immediately after it has been loaded. It is mostly useful when pre-loading the cache from underlying data store before start, or for read-only caches.
p - Optional predicate (may be null). If provided, will be used to
filter values to be put into cache.args - Optional user arguments to be passed into
CacheStore.loadCache(org.apache.ignite.lang.IgniteBiInClosure,Object...) method.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015