public interface GridCacheProjectionEx<K,V> extends GridCacheProjection<K,V>
| Modifier and Type | Method and Description |
|---|---|
Collection<GridDrStateTransferDescriptor> |
drListStateTransfers()
List currently active state transfers.
|
void |
drPause()
Pauses data center replication for this cache.
|
GridDrStatus |
drPauseState()
Get DR pause state.
|
void |
drResume()
Resumes data center replication for this cache.
|
GridFuture<?> |
drStateTransfer(Collection<Byte> dataCenterIds)
Starts full state transfer.
|
Set<GridCacheEntry<K,V>> |
entrySetx(GridPredicate<GridCacheEntry<K,V>>... filter)
Gets entry set containing internal entries.
|
GridCacheProjectionEx<K,V> |
forSubjectId(UUID subjId)
Creates projection for specified subject ID.
|
V |
get(K key,
GridCacheEntryEx<K,V> entry,
GridPredicate<GridCacheEntry<K,V>>... filter) |
Map<K,V> |
getAllOutTx(List<K> keys)
Gets values from cache.
|
GridFuture<Map<K,V>> |
getAllOutTxAsync(List<K> keys)
Asynchronously gets values from cache.
|
V |
getForcePrimary(K key)
Gets value from cache.
|
GridFuture<V> |
getForcePrimaryAsync(K key)
Asynchronously gets value from cache.
|
long |
ggfsDataSpaceMax()
Get maximum space available for GGFS.
|
long |
ggfsDataSpaceUsed()
Get current amount of used GGFS space in bytes.
|
boolean |
isDrSystemCache()
Checks whether this cache is DR system cache.
|
boolean |
isGgfsDataCache()
Checks whether this cache is GGFS data cache.
|
boolean |
isMongoDataCache()
Checks whether this cache is Mongo data cache.
|
boolean |
isMongoMetaCache()
Checks whether this cache is Mongo meta cache.
|
GridPredicate<GridCacheEntry<K,V>> |
predicate()
Gets predicate on which this projection is based on or
null
if predicate is not defined. |
V |
put(K key,
V val,
GridCacheEntryEx<K,V> entry,
long ttl,
GridPredicate<GridCacheEntry<K,V>>... filter)
Internal method that is called from
GridCacheEntryImpl. |
void |
putAllDr(Map<? extends K,GridCacheDrInfo<V>> drMap)
Store DR data.
|
GridFuture<?> |
putAllDrAsync(Map<? extends K,GridCacheDrInfo<V>> drMap)
Store DR data asynchronously.
|
GridFuture<V> |
putAsync(K key,
V val,
GridCacheEntryEx<K,V> entry,
long ttl,
GridPredicate<GridCacheEntry<K,V>>... filter)
Internal method that is called from
GridCacheEntryImpl. |
boolean |
putx(K key,
V val,
GridCacheEntryEx<K,V> entry,
long ttl,
GridPredicate<GridCacheEntry<K,V>>... filter)
Internal method that is called from
GridCacheEntryImpl. |
GridFuture<Boolean> |
putxAsync(K key,
V val,
GridCacheEntryEx<K,V> entry,
long ttl,
GridPredicate<GridCacheEntry<K,V>>... filter)
Internal method that is called from
GridCacheEntryImpl. |
V |
remove(K key,
GridCacheEntryEx<K,V> entry,
GridPredicate<GridCacheEntry<K,V>>... filter)
Internal method that is called from
GridCacheEntryImpl. |
void |
removeAllDr(Map<? extends K,GridCacheVersion> drMap)
Removes DR data.
|
GridFuture<?> |
removeAllDrAsync(Map<? extends K,GridCacheVersion> drMap)
Removes DR data asynchronously.
|
GridFuture<V> |
removeAsync(K key,
GridCacheEntryEx<K,V> entry,
GridPredicate<GridCacheEntry<K,V>>... filter)
Internal method that is called from
GridCacheEntryImpl. |
boolean |
removex(K key,
GridCacheEntryEx<K,V> entry,
GridPredicate<GridCacheEntry<K,V>>... filter)
Internal method that is called from
GridCacheEntryImpl. |
GridCacheReturn<V> |
removex(K key,
V val)
Removes given key mapping from cache if one exists and value is equal to the passed in value.
|
GridFuture<Boolean> |
removexAsync(K key,
GridCacheEntryEx<K,V> entry,
GridPredicate<GridCacheEntry<K,V>>... filter)
Internal method that is called from
GridCacheEntryImpl. |
GridFuture<GridCacheReturn<V>> |
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<V> |
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. |
GridFuture<GridCacheReturn<V>> |
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. |
GridFuture<?> |
transformAsync(K key,
GridClosure<V,V> transformer,
GridCacheEntryEx<K,V> entry,
long ttl)
Internal method that is called from
GridCacheEntryImpl. |
cache, clear, clearAll, compact, compactAll, containsKey, containsValue, entry, entrySet, entrySet, evict, evictAll, evictAll, flags, flagsOff, flagsOn, forAll, forEach, get, getAll, getAllAsync, getAsync, globalClearAll, gridProjection, isEmpty, isLocked, isLockedByThread, keySet, lock, lockAll, lockAllAsync, lockAsync, name, nearSize, peek, peek, primaryEntrySet, primaryKeySet, primarySize, primaryValues, projection, projection, projection, promote, promoteAll, put, putAll, putAllAsync, putAsync, putIfAbsent, putIfAbsentAsync, putx, putxAsync, putxIfAbsent, putxIfAbsentAsync, queries, reload, reloadAll, reloadAll, reloadAllAsync, reloadAllAsync, reloadAsync, remove, remove, removeAll, removeAll, removeAllAsync, removeAllAsync, removeAsync, removeAsync, removex, removexAsync, replace, replace, replaceAsync, replaceAsync, replacex, replacexAsync, size, toMap, transform, transformAll, transformAll, transformAllAsync, transformAllAsync, transformAndCompute, transformAsync, tx, txStart, txStart, txStart, txStartAffinity, txStartPartition, unlock, unlockAll, valuesaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, removeMeta, removeMeta, replaceMetaGridCacheProjectionEx<K,V> forSubjectId(UUID subjId)
subjId - Client ID.@Nullable GridPredicate<GridCacheEntry<K,V>> predicate()
null
if predicate is not defined.@Nullable V put(K key, V val, @Nullable GridCacheEntryEx<K,V> entry, long ttl, @Nullable GridPredicate<GridCacheEntry<K,V>>... filter) throws GridException
GridCacheEntryImpl.key - Key.val - Value.entry - Cached entry. If not provided, equivalent to {GridCacheProjection#put}.ttl - Optional time-to-live. If negative, leaves ttl value unchanged.filter - Optional filter.GridException - If failed.GridFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx<K,V> entry, long ttl, @Nullable GridPredicate<GridCacheEntry<K,V>>... 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<K,V> entry, long ttl, @Nullable GridPredicate<GridCacheEntry<K,V>>... filter) throws GridException
GridCacheEntryImpl.key - Key.val - Value.entry - Cached entry. If not provided, equivalent to {GridCacheProjection#put}.ttl - Optional time-to-live. If negative, leaves ttl value unchanged.filter - Optional filter.GridException - If failed.GridFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx<K,V> entry, long ttl, @Nullable GridPredicate<GridCacheEntry<K,V>>... filter)
GridCacheEntryImpl.key - Key.val - Value.entry - Cached entry. If not provided, equivalent to {GridCacheProjection#put}.ttl - Optional time-to-live. If negative, leave ttl value unchanged.filter - Optional filter.void putAllDr(Map<? extends K,GridCacheDrInfo<V>> drMap) throws GridException
drMap - DR map.GridException - If put operation failed.GridCacheFlagException - If projection flags validation failed.GridFuture<?> putAllDrAsync(Map<? extends K,GridCacheDrInfo<V>> drMap) throws GridException
drMap - DR map.GridException - If put operation failed.GridCacheFlagException - If projection flags validation failed.GridFuture<?> transformAsync(K key, GridClosure<V,V> transformer, @Nullable GridCacheEntryEx<K,V> entry, long ttl)
GridCacheEntryImpl.key - Key.transformer - Transformer closure.entry - Cached entry.ttl - Optional time-to-lve.@Nullable V remove(K key, @Nullable GridCacheEntryEx<K,V> entry, @Nullable GridPredicate<GridCacheEntry<K,V>>... filter) throws GridException
GridCacheEntryImpl.key - Key to remove.entry - Cached entry. If not provided, equivalent to {GridCacheProjection#put}.filter - Optional filter.GridException - If failed.GridFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx<K,V> entry, @Nullable GridPredicate<GridCacheEntry<K,V>>... filter)
GridCacheEntryImpl.key - Key to remove.entry - Optional cached entry.filter - Optional filter.void removeAllDr(Map<? extends K,GridCacheVersion> drMap) throws GridException
drMap - DR map.GridException - If remove failed.GridCacheFlagException - If projection flags validation failed.GridFuture<?> removeAllDrAsync(Map<? extends K,GridCacheVersion> drMap) throws GridException
drMap - DR map.GridException - If remove failed.GridCacheFlagException - If projection flags validation failed.boolean removex(K key, @Nullable GridCacheEntryEx<K,V> entry, @Nullable GridPredicate<GridCacheEntry<K,V>>... filter) throws GridException
GridCacheEntryImpl.key - Key to remove.entry - Cached entry. If not provided, equivalent to {GridCacheProjection#put}.filter - Optional filter.GridException - If failed.GridFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx<K,V> entry, @Nullable GridPredicate<GridCacheEntry<K,V>>... filter)
GridCacheEntryImpl.key - Key to remove.entry - Cached entry. If not provided, equivalent to {GridCacheProjection#put}.filter - Optional filter.GridFuture<GridCacheReturn<V>> 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 GridCacheStore
via GridCacheStore.put(GridCacheTx, Object, Object) method.
GridCacheFlag.LOCAL, GridCacheFlag.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.GridCacheFlagException - If projection flags validation failed.GridCacheReturn<V> replacex(K key, V oldVal, V newVal) throws GridException
'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 GridCacheStore
via GridCacheStore.put(GridCacheTx, Object, Object) method.
GridCacheFlag.LOCAL, GridCacheFlag.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.GridException - If replace operation failed.GridCacheFlagException - If projection flags validation failed.GridCacheReturn<V> removex(K key, V val) throws GridException
If write-through is enabled, the value will be removed from GridCacheStore
via GridCacheStore.remove(GridCacheTx, Object) method.
GridCacheFlag.LOCAL, GridCacheFlag.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.GridException - If remove failed.GridCacheFlagException - If projection flags validation failed.GridFuture<GridCacheReturn<V>> 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 GridCacheStore
via GridCacheStore.remove(GridCacheTx, Object) method.
GridCacheFlag.LOCAL, GridCacheFlag.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.GridCacheFlagException - If projection flags validation failed.@Nullable V get(K key, @Nullable GridCacheEntryEx<K,V> entry, @Nullable GridPredicate<GridCacheEntry<K,V>>... filter) throws GridException
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.GridException - If failed.@Nullable V getForcePrimary(K key) throws GridException
key - Key to get value for.GridException - If failed.GridFuture<V> getForcePrimaryAsync(K key)
key - Key to get value for.@Nullable Map<K,V> getAllOutTx(List<K> keys) throws GridException
keys - Keys to get values for.GridException - If failed.GridFuture<Map<K,V>> getAllOutTxAsync(List<K> keys)
keys - Keys to get values for.boolean isGgfsDataCache()
True in case this cache is GGFS data cache.long ggfsDataSpaceUsed()
long ggfsDataSpaceMax()
boolean isMongoDataCache()
True if this cache is mongo data cache.boolean isMongoMetaCache()
True if this cache is mongo meta cache.boolean isDrSystemCache()
True if this cache is DR system cache.GridFuture<?> drStateTransfer(Collection<Byte> dataCenterIds)
dataCenterIds - Data center IDs for which full state transfer was requested.Collection<GridDrStateTransferDescriptor> drListStateTransfers()
void drPause()
void drResume()
@Nullable GridDrStatus drPauseState()
Set<GridCacheEntry<K,V>> entrySetx(GridPredicate<GridCacheEntry<K,V>>... filter)
filter - Filter.Copyright © 2014. All rights reserved.