public class HibernateCacheProxy extends Object implements org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>
| Modifier and Type | Method and Description |
|---|---|
Affinity |
affinity()
Gets affinity service to provide information about data partitioning
and distribution.
|
org.apache.ignite.internal.processors.cache.IgniteInternalCache |
cache()
Gets base cache for this projection.
|
void |
clear()
Clears cache on all nodes that store it's data.
|
void |
clear(Object key)
Clears key on all nodes that store it's data.
|
void |
clearAll(Set keys)
Clears keys on all nodes that store it's data.
|
org.apache.ignite.internal.IgniteInternalFuture<?> |
clearAllAsync(Set keys) |
org.apache.ignite.internal.IgniteInternalFuture<?> |
clearAsync() |
org.apache.ignite.internal.IgniteInternalFuture<?> |
clearAsync(Object key) |
void |
clearLocally(boolean srv,
boolean near,
boolean readers)
Clears all entries from this cache only if the entry is not
currently locked or participating in a transaction.
|
boolean |
clearLocally(Object key)
Clears an entry from this cache and swap storage only if the entry
is not currently locked, and is not participating in a transaction.
|
void |
clearLocallyAll(Set keys,
boolean srv,
boolean near,
boolean readers)
Clears entries from this cache and swap storage only if the entry
is not currently locked, and is not participating in a transaction.
|
CacheMetrics |
clusterMetrics()
Gets whole cluster metrics (statistics) for this cache.
|
CacheMetrics |
clusterMetrics(ClusterGroup grp)
Gets cluster group metrics (statistics) for this cache.
|
CacheMetricsMXBean |
clusterMxBean()
Gets whole cluster metrics (statistics) for this cache.
|
CacheConfiguration |
configuration()
Gets configuration bean for this cache.
|
boolean |
containsKey(Object key) |
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
containsKeyAsync(Object key) |
boolean |
containsKeys(Collection keys) |
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
containsKeysAsync(Collection keys) |
org.apache.ignite.internal.processors.cache.GridCacheContext |
context() |
Set<javax.cache.Cache.Entry<Object,Object>> |
entrySet()
Gets set of all entries cached on this node.
|
boolean |
evict(Object key)
Evicts entry associated with given key from cache.
|
void |
evictAll(@Nullable Collection keys)
Attempts to evict all entries associated with keys.
|
@Nullable javax.cache.expiry.ExpiryPolicy |
expiry() |
org.apache.ignite.internal.processors.cache.IgniteInternalCache |
forSubjectId(UUID subjId)
Creates projection for specified subject ID.
|
@Nullable Object |
get(Object key)
Retrieves value mapped to the specified key from cache.
|
Map |
getAll(@Nullable Collection keys)
Retrieves values mapped to the specified keys from cache.
|
org.apache.ignite.internal.IgniteInternalFuture<Map<Object,Object>> |
getAllAsync(@Nullable Collection keys)
Asynchronously retrieves values mapped to the specified keys from cache.
|
Map |
getAllOutTx(Set keys)
Gets values from cache.
|
org.apache.ignite.internal.IgniteInternalFuture<Map<Object,Object>> |
getAllOutTxAsync(Set keys)
Gets values from cache.
|
@Nullable Object |
getAndPut(Object key,
Object val)
Stores given key-value pair in cache.
|
org.apache.ignite.internal.IgniteInternalFuture |
getAndPutAsync(Object key,
Object val)
Asynchronously stores given key-value pair in cache.
|
@Nullable Object |
getAndPutIfAbsent(Object key,
Object val)
Stores given key-value pair in cache only if cache had no previous mapping for it.
|
org.apache.ignite.internal.IgniteInternalFuture |
getAndPutIfAbsentAsync(Object key,
Object val)
Asynchronously stores given key-value pair in cache only if cache had no previous mapping for it.
|
@Nullable Object |
getAndRemove(Object key)
Removes given key mapping from cache.
|
org.apache.ignite.internal.IgniteInternalFuture |
getAndRemoveAsync(Object key)
Asynchronously removes given key mapping from cache.
|
@Nullable Object |
getAndReplace(Object key,
Object val)
Stores given key-value pair in cache only if there is a previous mapping for it.
|
org.apache.ignite.internal.IgniteInternalFuture |
getAndReplaceAsync(Object key,
Object val)
Asynchronously stores given key-value pair in cache only if there is a previous mapping for it.
|
org.apache.ignite.internal.IgniteInternalFuture |
getAsync(Object key)
Asynchronously retrieves value mapped to the specified key from cache.
|
Collection<CacheEntry<Object,Object>> |
getEntries(@Nullable Collection keys)
Retrieves values mapped to the specified keys from cache.
|
org.apache.ignite.internal.IgniteInternalFuture<Collection<CacheEntry<Object,Object>>> |
getEntriesAsync(@Nullable Collection keys)
Asynchronously retrieves values mapped to the specified keys from cache.
|
@Nullable CacheEntry |
getEntry(Object key)
Retrieves value mapped to the specified key from cache.
|
org.apache.ignite.internal.IgniteInternalFuture<CacheEntry<Object,Object>> |
getEntryAsync(Object key)
Asynchronously retrieves value mapped to the specified key from cache.
|
@Nullable Object |
getForcePrimary(Object key)
Gets value from cache.
|
org.apache.ignite.internal.IgniteInternalFuture |
getForcePrimaryAsync(Object key)
Asynchronously gets value from cache.
|
@Nullable javax.cache.processor.EntryProcessorResult |
invoke(@Nullable org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion topVer,
Object key,
javax.cache.processor.EntryProcessor entryProcessor,
Object... args) |
@Nullable javax.cache.processor.EntryProcessorResult |
invoke(Object key,
javax.cache.processor.EntryProcessor entryProcessor,
Object... args) |
Map |
invokeAll(Map map,
Object... args) |
Map |
invokeAll(Set keys,
javax.cache.processor.EntryProcessor entryProcessor,
Object... args) |
org.apache.ignite.internal.IgniteInternalFuture<Map> |
invokeAllAsync(Map map,
Object... args) |
org.apache.ignite.internal.IgniteInternalFuture<Map> |
invokeAllAsync(Set keys,
javax.cache.processor.EntryProcessor entryProcessor,
Object... args) |
org.apache.ignite.internal.IgniteInternalFuture<javax.cache.processor.EntryProcessorResult> |
invokeAsync(Object key,
javax.cache.processor.EntryProcessor entryProcessor,
Object... args) |
boolean |
isEmpty()
Returns
true if this map contains no key-value mappings. |
boolean |
isLocked(Object key)
Checks if any node owns a lock for this key.
|
boolean |
isLockedByThread(Object key)
Checks if current thread owns a lock on this key.
|
Iterator |
iterator() |
org.apache.ignite.internal.processors.cache.IgniteInternalCache |
keepBinary()
Creates projection that will operate with binary objects.
|
Set |
keySet()
Set of keys cached on this node.
|
HibernateKeyTransformer |
keyTransformer() |
Iterable<javax.cache.Cache.Entry<Object,Object>> |
localEntries(CachePeekMode[] peekModes) |
int |
localEntrySize(Object key)
Returns approximate number of bytes that required by the given
key and corresponding value in the off-heap storage. |
void |
localLoadCache(@Nullable IgniteBiPredicate p,
Object... args)
Delegates to
CacheStore.loadCache(IgniteBiInClosure, Object...) method
to load state from the underlying persistent storage. |
org.apache.ignite.internal.IgniteInternalFuture<?> |
localLoadCacheAsync(@Nullable IgniteBiPredicate p,
Object... args)
Asynchronously delegates to
CacheStore.loadCache(IgniteBiInClosure, Object...) method
to reload state from the underlying persistent storage. |
CacheMetrics |
localMetrics()
Gets local metrics (statistics) for this cache.
|
CacheMetricsMXBean |
localMxBean()
Gets local metrics (statistics) for this cache.
|
@Nullable Object |
localPeek(Object key,
CachePeekMode[] peekModes) |
boolean |
localPreloadPartition(int part)
Preloads cache partition if it exists on local node.
|
int |
localSize(CachePeekMode[] peekModes) |
long |
localSizeLong(CachePeekMode[] peekModes) |
long |
localSizeLong(int partition,
CachePeekMode[] peekModes) |
boolean |
lock(Object key,
long timeout)
Synchronously acquires lock on a cached object with given
key only if the passed in filter (if any) passes.
|
boolean |
lockAll(@Nullable Collection keys,
long timeout)
All or nothing synchronous lock for passed in keys.
|
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
lockAllAsync(@Nullable Collection keys,
long timeout)
All or nothing synchronous lock for passed in keys.
|
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
lockAsync(Object key,
long timeout)
Asynchronously acquires lock on a cached object with given
key only if the passed in filter (if any) passes.
|
Collection<Integer> |
lostPartitions() |
String |
name()
Gets name of this cache (
null for default cache). |
int |
nearSize()
Gets size of near cache key set.
|
long |
offHeapAllocatedSize()
Gets memory size allocated in off-heap.
|
long |
offHeapEntriesCount()
Gets number of cache entries stored in off-heap memory.
|
void |
preloadPartition(int part)
Preload cache partition.
|
org.apache.ignite.internal.IgniteInternalFuture<?> |
preloadPartitionAsync(int part)
Preload cache partition.
|
int |
primarySize()
Gets the number of all primary entries cached on this node.
|
long |
primarySizeLong()
Gets the number of all primary entries cached on this node as a long value.
|
boolean |
put(Object key,
Object val)
Stores given key-value pair in cache.
|
void |
putAll(@Nullable Map m)
Stores given key-value pairs in cache.
|
org.apache.ignite.internal.IgniteInternalFuture<?> |
putAllAsync(@Nullable Map m)
Asynchronously stores given key-value pairs in cache.
|
void |
putAllConflict(Map drMap)
Store DR data.
|
org.apache.ignite.internal.IgniteInternalFuture<?> |
putAllConflictAsync(Map drMap)
Store DR data asynchronously.
|
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
putAsync(Object key,
Object val)
Stores given key-value pair in cache.
|
boolean |
putIfAbsent(Object key,
Object val)
Stores given key-value pair in cache only if cache had no previous mapping for it.
|
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
putIfAbsentAsync(Object key,
Object val)
Asynchronously stores given key-value pair in cache only if cache had no previous mapping for it.
|
org.apache.ignite.internal.IgniteInternalFuture<?> |
rebalance()
Forces this cache node to re-balance its partitions.
|
boolean |
remove(Object key)
Removes given key mapping from cache.
|
boolean |
remove(Object key,
Object val)
Removes given key mapping from cache if one exists and value is equal to the passed in value.
|
void |
removeAll()
Removes mappings from cache.
|
void |
removeAll(@Nullable Collection keys)
Removes given key mappings from cache.
|
org.apache.ignite.internal.IgniteInternalFuture<?> |
removeAllAsync() |
org.apache.ignite.internal.IgniteInternalFuture<?> |
removeAllAsync(@Nullable Collection keys)
Asynchronously removes given key mappings from cache for entries.
|
void |
removeAllConflict(Map drMap)
Removes DR data.
|
org.apache.ignite.internal.IgniteInternalFuture<?> |
removeAllConflictAsync(Map drMap)
Removes DR data asynchronously.
|
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
removeAsync(Object key)
Asynchronously removes given key mapping from cache.
|
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
removeAsync(Object key,
Object val)
Asynchronously removes given key mapping from cache if one exists and value is equal to the passed in value.
|
boolean |
replace(Object key,
Object val)
Stores given key-value pair in cache only if only if there is a previous mapping for it.
|
boolean |
replace(Object key,
Object oldVal,
Object newVal)
Stores given key-value pair in cache only if only if the previous value is equal to the
'oldVal' passed in. |
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
replaceAsync(Object key,
Object val)
Asynchronously stores given key-value pair in cache only if only if there is a previous mapping for it.
|
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
replaceAsync(Object key,
Object oldVal,
Object newVal)
Asynchronously stores given key-value pair in cache only if only if the previous value is equal to the
'oldVal' passed in. |
Iterator<javax.cache.Cache.Entry<Object,Object>> |
scanIterator(boolean keepBinary,
@Nullable IgniteBiPredicate p) |
Iterator<javax.cache.Cache.Entry<Object,Object>> |
scanIterator(boolean keepBinary,
@Nullable IgniteBiPredicate p,
long timeout) |
org.apache.ignite.internal.processors.cache.IgniteInternalCache |
setSkipStore(boolean skipStore) |
int |
size()
Gets the number of all entries cached on this node.
|
int |
size(CachePeekMode[] peekModes) |
org.apache.ignite.internal.IgniteInternalFuture<Integer> |
sizeAsync(CachePeekMode[] peekModes) |
long |
sizeLong()
Gets the number of all entries cached on this node as a long value.
|
long |
sizeLong(CachePeekMode[] peekModes) |
long |
sizeLong(int partition,
CachePeekMode[] peekModes) |
org.apache.ignite.internal.IgniteInternalFuture<Long> |
sizeLongAsync(CachePeekMode[] peekModes) |
org.apache.ignite.internal.IgniteInternalFuture<Long> |
sizeLongAsync(int partition,
CachePeekMode[] peekModes) |
boolean |
skipStore() |
boolean |
touch(Object key)
Updates the time to live value for the given
key. |
org.apache.ignite.internal.IgniteInternalFuture<Boolean> |
touchAsync(Object key)
Updates the time to live value for the given
key. |
@Nullable org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal |
tx()
Gets transaction started by this thread or
null if this thread does
not have a transaction. |
Transaction |
txStart(TransactionConcurrency concurrency,
TransactionIsolation isolation)
Starts new transaction with the specified concurrency and isolation.
|
Transaction |
txStart(TransactionConcurrency concurrency,
TransactionIsolation isolation,
long timeout,
int txSize)
Starts transaction with specified isolation, concurrency, timeout, invalidation flag,
and number of participating entries.
|
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal |
txStartEx(TransactionConcurrency concurrency,
TransactionIsolation isolation) |
void |
unlock(Object key)
Unlocks given key only if current thread owns the lock.
|
void |
unlockAll(@Nullable Collection keys)
Unlocks given keys only if current thread owns the locks.
|
<K1,V1> org.apache.ignite.internal.processors.cache.IgniteInternalCache<K1,V1> |
withAllowAtomicOpsInTx() |
org.apache.ignite.internal.processors.cache.IgniteInternalCache |
withExpiryPolicy(javax.cache.expiry.ExpiryPolicy plc) |
org.apache.ignite.internal.processors.cache.IgniteInternalCache |
withNoRetries() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic HibernateKeyTransformer keyTransformer()
public String name()
null for default cache).public boolean skipStore()
public org.apache.ignite.internal.processors.cache.IgniteInternalCache setSkipStore(boolean skipStore)
public boolean isEmpty()
true if this map contains no key-value mappings.public boolean containsKey(Object key)
public org.apache.ignite.internal.IgniteInternalFuture<Boolean> containsKeyAsync(Object key)
public boolean containsKeys(Collection keys)
public org.apache.ignite.internal.IgniteInternalFuture<Boolean> containsKeysAsync(Collection keys)
@Nullable public @Nullable Object localPeek(Object key, CachePeekMode[] peekModes) throws IgniteCheckedException
localPeek in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key.peekModes - Peek modes.IgniteCheckedException - If failed.public Iterable<javax.cache.Cache.Entry<Object,Object>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException
localEntries in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>peekModes - Peek modes.IgniteCheckedException - If failed.@Nullable public @Nullable Object get(Object key) throws IgniteCheckedException
null
means entry did not pass the provided filter or cache has no mapping for the
key.
If the value is not present in cache, then it will be looked up from swap storage. If
it's not present in swap, or if swap is disable, and if read-through is allowed, value
will be loaded from CacheStore persistent storage via
CacheStore#load(Transaction, Object) method.
get in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to retrieve the value for.IgniteCheckedException - If get operation failed.@Nullable public @Nullable CacheEntry getEntry(Object key) throws IgniteCheckedException
null
means entry did not pass the provided filter or cache has no mapping for the
key.
If the value is not present in cache, then it will be looked up from swap storage. If
it's not present in swap, or if swap is disable, and if read-through is allowed, value
will be loaded from CacheStore persistent storage via
CacheStore#load(Transaction, Object) method.
getEntry in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to retrieve the value for.IgniteCheckedException - If get operation failed.public org.apache.ignite.internal.IgniteInternalFuture getAsync(Object key)
null
means entry did not pass the provided filter or cache has no mapping for the
key.
If the value is not present in cache, then it will be looked up from swap storage. If
it's not present in swap, or if swap is disabled, and if read-through is allowed, value
will be loaded from CacheStore persistent storage via
CacheStore#load(Transaction, Object) method.
public org.apache.ignite.internal.IgniteInternalFuture<CacheEntry<Object,Object>> getEntryAsync(Object key)
null
means entry did not pass the provided filter or cache has no mapping for the
key.
If the value is not present in cache, then it will be looked up from swap storage. If
it's not present in swap, or if swap is disabled, and if read-through is allowed, value
will be loaded from CacheStore persistent storage via
CacheStore#load(Transaction, Object) method.
public Map getAll(@Nullable @Nullable Collection keys) throws IgniteCheckedException
If some value is not present in cache, then it will be looked up from swap storage. If
it's not present in swap, or if swap is disabled, and if read-through is allowed, value
will be loaded from CacheStore persistent storage via
CacheStore#loadAll(Transaction, Collection, org.apache.ignite.lang.IgniteBiInClosure) method.
getAll in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keys - Keys to get.IgniteCheckedException - If get operation failed.public Collection<CacheEntry<Object,Object>> getEntries(@Nullable @Nullable Collection keys) throws IgniteCheckedException
If some value is not present in cache, then it will be looked up from swap storage. If
it's not present in swap, or if swap is disabled, and if read-through is allowed, value
will be loaded from CacheStore persistent storage via
CacheStore#loadAll(Transaction, Collection, org.apache.ignite.lang.IgniteBiInClosure) method.
getEntries in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keys - Keys to get.IgniteCheckedException - If get operation failed.public org.apache.ignite.internal.IgniteInternalFuture<Map<Object,Object>> getAllAsync(@Nullable @Nullable Collection keys)
If some value is not present in cache, then it will be looked up from swap storage. If
it's not present in swap, or if swap is disabled, and if read-through is allowed, value
will be loaded from CacheStore persistent storage via
CacheStore#loadAll(Transaction, Collection, org.apache.ignite.lang.IgniteBiInClosure) method.
public org.apache.ignite.internal.IgniteInternalFuture<Collection<CacheEntry<Object,Object>>> getEntriesAsync(@Nullable @Nullable Collection keys)
If some value is not present in cache, then it will be looked up from swap storage. If
it's not present in swap, or if swap is disabled, and if read-through is allowed, value
will be loaded from CacheStore persistent storage via
CacheStore#loadAll(Transaction, Collection, org.apache.ignite.lang.IgniteBiInClosure) method.
@Nullable public @Nullable Object getAndPut(Object key, Object val) throws IgniteCheckedException
CacheMode.PARTITIONED or CacheMode.REPLICATED caches,
the value will be loaded from the primary node, which in its turn may load the value
from the swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method #putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[]) should
always be used instead of this one to avoid the overhead associated with returning of the previous value.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
getAndPut in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to store in cache.val - Value to be associated with the given key.null
if entry did not pass the filter, or if there was no mapping for the key in swap
or in persistent storage.IgniteCheckedException - If put operation failed.public org.apache.ignite.internal.IgniteInternalFuture getAndPutAsync(Object key, Object val)
CacheMode.REPLICATED caches, the value will be loaded from swap
and, if it's not there, and read-through is allowed, from the underlying
CacheStore storage. In case of CacheMode.PARTITIONED caches,
the value will be loaded from the primary node, which in its turn may load the value
from the swap storage, and consecutively, if it's not in swap and read-through is allowed,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method #putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[]) should
always be used instead of this one to avoid the overhead associated with returning of the previous value.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
public boolean put(Object key, Object val) throws IgniteCheckedException
This method will return true if value is stored in cache and false otherwise.
Unlike #put(Object, Object, org.apache.ignite.lang.IgnitePredicate[]) method, it does not return previous
value and, therefore, does not have any overhead associated with returning a value. It
should be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
put in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to store in cache.val - Value to be associated with the given key.True if optional filter passed and value was stored in cache,
false otherwise. Note that this method will return true if filter is not
specified.IgniteCheckedException - If put operation failed.public org.apache.ignite.internal.IgniteInternalFuture<Boolean> putAsync(Object key, Object val)
This method will return true if value is stored in cache and false otherwise.
Unlike #put(Object, Object, org.apache.ignite.lang.IgnitePredicate[]) method, it does not return previous
value and, therefore, does not have any overhead associated with returning of a value. It
should always be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
putAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to store in cache.val - Value to be associated with the given key.true if optional filter
passed and value was stored in cache, false otherwise. Note that future will
return true if filter is not specified.@Nullable public @Nullable Object getAndPutIfAbsent(Object key, Object val) throws IgniteCheckedException
CacheMode.PARTITIONED or CacheMode.REPLICATED caches,
the value will be loaded from the primary node, which in its turn may load the value
from the swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method IgniteInternalCache.putIfAbsent(Object, Object) should
always be used instead of this one to avoid the overhead associated with returning of the
previous value.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
getAndPutIfAbsent in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to store in cache.val - Value to be associated with the given key.IgniteCheckedException - If put operation failed.public org.apache.ignite.internal.IgniteInternalFuture getAndPutIfAbsentAsync(Object key, Object val)
CacheMode.PARTITIONED or CacheMode.REPLICATED caches,
the value will be loaded from the primary node, which in its turn may load the value
from the swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method IgniteInternalCache.putIfAbsentAsync(Object, Object) should
always be used instead of this one to avoid the overhead associated with returning of the
previous value.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
getAndPutIfAbsentAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to store in cache.val - Value to be associated with the given key.public boolean putIfAbsent(Object key, Object val) throws IgniteCheckedException
This method will return true if value is stored in cache and false otherwise.
Unlike IgniteInternalCache.getAndPutIfAbsent(Object, Object) method, it does not return previous
value and, therefore, does not have any overhead associated with returning of a value. It
should always be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
putIfAbsent in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to store in cache.val - Value to be associated with the given key.true if value is stored in cache and false otherwise.IgniteCheckedException - If put operation failed.public org.apache.ignite.internal.IgniteInternalFuture<Boolean> putIfAbsentAsync(Object key, Object val)
This method will return true if value is stored in cache and false otherwise.
Unlike IgniteInternalCache.getAndPutIfAbsent(Object, Object) method, it does not return previous
value and, therefore, does not have any overhead associated with returning of a value. It
should always be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
@Nullable public @Nullable Object getAndReplace(Object key, Object val) throws IgniteCheckedException
CacheMode.PARTITIONED or CacheMode.REPLICATED caches,
the value will be loaded from the primary node, which in its turn may load the value
from the swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method IgniteInternalCache.replace(Object, Object) should
always be used instead of this one to avoid the overhead associated with returning of the
previous value.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
getAndReplace in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to store in cache.val - Value to be associated with the given key.IgniteCheckedException - If replace operation failed.public org.apache.ignite.internal.IgniteInternalFuture getAndReplaceAsync(Object key, Object val)
CacheMode.PARTITIONED caches, the value will be loaded from the primary node,
which in its turn may load the value from the swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method IgniteInternalCache.replace(Object, Object) should
always be used instead of this one to avoid the overhead associated with returning of the
previous value.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
public boolean replace(Object key, Object val) throws IgniteCheckedException
This method will return true if value is stored in cache and false otherwise.
Unlike IgniteInternalCache.getAndReplace(Object, Object) method, it does not return previous
value and, therefore, does not have any overhead associated with returning of a value. It
should always be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
replace in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to store in cache.val - Value to be associated with the given key.True if replace happened, false otherwise.IgniteCheckedException - If replace operation failed.public org.apache.ignite.internal.IgniteInternalFuture<Boolean> replaceAsync(Object key, Object val)
This method will return true if value is stored in cache and false otherwise.
Unlike IgniteInternalCache.getAndReplaceAsync(Object, Object) method, it does not return previous
value and, therefore, does not have any overhead associated with returning of a value. It
should always be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
public boolean replace(Object key, Object oldVal, Object 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.
replace in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to store in cache.oldVal - Old value to match.newVal - Value to be associated with the given key.True if replace happened, false otherwise.IgniteCheckedException - If replace operation failed.public org.apache.ignite.internal.IgniteInternalFuture<Boolean> replaceAsync(Object key, Object oldVal, Object 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.
public void putAll(@Nullable
@Nullable Map m)
throws IgniteCheckedException
If write-through is enabled, the stored values will be persisted to CacheStore
via CacheStore#putAll(Transaction, Map) method.
putAll in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>m - Key-value pairs to store in cache.IgniteCheckedException - If put operation failed.public org.apache.ignite.internal.IgniteInternalFuture<?> putAllAsync(@Nullable @Nullable Map m)
If write-through is enabled, the stored values will be persisted to CacheStore
via CacheStore#putAll(Transaction, Map) method.
public Set keySet()
Iterator over this set will not fail if set was concurrently updated by another thread. This means that iterator may or may not return latest keys depending on whether they were added before or after current iterator position.
NOTE: this operation is not distributed and returns only the keys cached on this node.
public Set<javax.cache.Cache.Entry<Object,Object>> entrySet()
NOTE: this operation is not distributed and returns only the entries cached on this node.
public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation)
public org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal txStartEx(TransactionConcurrency concurrency, TransactionIsolation isolation)
public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, int txSize)
@Nullable public @Nullable org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal tx()
null if this thread does
not have a transaction.public boolean evict(Object key)
public void evictAll(@Nullable
@Nullable Collection keys)
public void clearLocally(boolean srv,
boolean near,
boolean readers)
Note that this operation is local as it merely clears entries from local cache. It does not remove entries from remote caches or from underlying persistent storage.
public boolean clearLocally(Object key)
Note that this operation is local as it merely clears an entry from local cache. It does not remove entries from remote caches or from underlying persistent storage.
clearLocally in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to clearLocally.True if entry was successfully cleared from cache, false
if entry was in use at the time of this method invocation and could not be
cleared.public void clearLocallyAll(Set keys, boolean srv, boolean near, boolean readers)
Note that this operation is local as it merely clears an entry from local cache. It does not remove entries from remote caches or from underlying persistent storage.
public void clear(Object key) throws IgniteCheckedException
IgniteInternalCache.clearLocally(Object) method which only
clears local node's cache.
Ignite will make the best attempt to clear caches on all nodes. If some caches could not be cleared, then exception will be thrown.
clear in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to clear.IgniteCheckedException - In case of cache could not be cleared on any of the nodes.public void clearAll(Set keys) throws IgniteCheckedException
IgniteInternalCache.clearLocallyAll(Set, boolean, boolean, boolean) method which only
clears local node's cache.
Ignite will make the best attempt to clear caches on all nodes. If some caches could not be cleared, then exception will be thrown.
clearAll in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keys - Keys to clear.IgniteCheckedException - In case of cache could not be cleared on any of the nodes.public void clear()
throws IgniteCheckedException
IgniteInternalCache.clearLocally(boolean, boolean, boolean) method which only
clears local node's cache.
Ignite will make the best attempt to clear caches on all nodes. If some caches could not be cleared, then exception will be thrown.
clear in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>IgniteCheckedException - In case of cache could not be cleared on any of the nodes.public org.apache.ignite.internal.IgniteInternalFuture<?> clearAsync()
public org.apache.ignite.internal.IgniteInternalFuture<?> clearAsync(Object key)
public org.apache.ignite.internal.IgniteInternalFuture<?> clearAllAsync(Set keys)
@Nullable public @Nullable Object getAndRemove(Object key) throws IgniteCheckedException
CacheMode.PARTITIONED or CacheMode.REPLICATED
caches, the value will be loaded from the primary node, which in its turn may load the value
from the disk-based swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method #removex(Object, org.apache.ignite.lang.IgnitePredicate[]) should
always be used instead of this one to avoid the overhead associated with returning of the
previous value.
If write-through is enabled, the value will be removed from CacheStore
via CacheStore#remove(Transaction, Object) method.
getAndRemove in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key whose mapping is to be removed from cache.null
if there was no value for this key.IgniteCheckedException - If remove operation failed.public org.apache.ignite.internal.IgniteInternalFuture getAndRemoveAsync(Object key)
CacheMode.PARTITIONED or CacheMode.REPLICATED
caches, the value will be loaded from the primary node, which in its turn may load the value
from the swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method #removex(Object, org.apache.ignite.lang.IgnitePredicate[]) should
always be used instead of this one to avoid the overhead associated with returning of the
previous value.
If write-through is enabled, the value will be removed from CacheStore
via CacheStore#remove(Transaction, Object) method.
public boolean remove(Object key) throws IgniteCheckedException
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.
remove in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key whose mapping is to be removed from cache.True if filter passed validation and entry was removed, false otherwise.
Note that if filter is not specified, this method will return true.IgniteCheckedException - If remove failed.public org.apache.ignite.internal.IgniteInternalFuture<Boolean> removeAsync(Object key)
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.
removeAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key whose mapping is to be removed from cache.true
if optional filters passed validation and remove did occur, false otherwise.
Note that if filter is not specified, this method will return true.public boolean remove(Object key, Object val) throws IgniteCheckedException
If write-through is enabled, the value will be removed from CacheStore
via CacheStore#remove(Transaction, Object) method.
remove in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key whose mapping is to be removed from cache.val - Value to match against currently cached value.True if entry was removed and passed in value matched the cached one,
false otherwise.IgniteCheckedException - If remove failed.public org.apache.ignite.internal.IgniteInternalFuture<Boolean> removeAsync(Object key, Object 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.
removeAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key whose mapping is to be removed from cache.val - Value to match against currently cached value.true
if currently cached value will match the passed in one.public void removeAll(@Nullable
@Nullable Collection keys)
throws IgniteCheckedException
If write-through is enabled, the values will be removed from CacheStore via IgniteDataStreamer.
removeAll in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keys - Keys whose mappings are to be removed from cache.IgniteCheckedException - If remove failed.public org.apache.ignite.internal.IgniteInternalFuture<?> removeAllAsync(@Nullable @Nullable Collection keys)
If write-through is enabled, the values will be removed from CacheStore via IgniteDataStreamer.
public void removeAll()
throws IgniteCheckedException
USE WITH CARE - if your cache has many entries then transaction will quickly become very heavy and slow.
If write-through is enabled, the values will be removed from CacheStore via IgniteDataStreamer.
removeAll in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>IgniteCheckedException - If remove failed.public org.apache.ignite.internal.IgniteInternalFuture<?> removeAllAsync()
public boolean lock(Object key, long timeout) throws IgniteCheckedException
TransactionConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.lock in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to lock.timeout - Timeout in milliseconds to wait for lock to be acquired
('0' for no expiration), -1 for immediate failure if
lock cannot be acquired immediately).True if all filters passed and lock was acquired,
false otherwise.IgniteCheckedException - If lock acquisition resulted in error.public org.apache.ignite.internal.IgniteInternalFuture<Boolean> lockAsync(Object key, long timeout)
TransactionConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.lockAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to lock.timeout - Timeout in milliseconds to wait for lock to be acquired
('0' for no expiration, -1 for immediate failure if
lock cannot be acquired immediately).true
whenever all filters pass and locks are acquired before timeout is expired,
false otherwise.public boolean lockAll(@Nullable
@Nullable Collection keys,
long timeout)
throws IgniteCheckedException
TransactionConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.lockAll in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keys - Keys to lock.timeout - Timeout in milliseconds to wait for lock to be acquired
('0' for no expiration).True if all filters passed and locks were acquired before
timeout has expired, false otherwise.IgniteCheckedException - If lock acquisition resulted in error.public org.apache.ignite.internal.IgniteInternalFuture<Boolean> lockAllAsync(@Nullable @Nullable Collection keys, long timeout)
TransactionConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.lockAllAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keys - Keys to lock.timeout - Timeout in milliseconds to wait for lock to be acquired
('0' for no expiration).true if all filters passed and locks were acquired before
timeout has expired, false otherwise.public void unlock(Object key) throws IgniteCheckedException
TransactionConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.unlock in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to unlock.IgniteCheckedException - If unlock execution resulted in error.public void unlockAll(@Nullable
@Nullable Collection keys)
throws IgniteCheckedException
TransactionConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.unlockAll in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keys - Keys to unlock.IgniteCheckedException - If unlock execution resulted in error.public boolean isLocked(Object key)
This is a local in-VM operation and does not involve any network trips or access to persistent storage in any way.
public boolean isLockedByThread(Object key)
This is a local in-VM operation and does not involve any network trips or access to persistent storage in any way.
public int size()
IgniteInternalCache. It is essentially the
size of cache key set and is semantically identical to {Cache.keySet().size().
NOTE: this operation is not distributed and returns only the number of entries cached on this node.
public long sizeLong()
IgniteInternalCache. It is essentially the
size of cache key set and is semantically identical to {Cache.keySet().size().
NOTE: this operation is not distributed and returns only the number of entries cached on this node.
public int localSize(CachePeekMode[] peekModes) throws IgniteCheckedException
localSize in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>peekModes - Peek modes.IgniteCheckedException - If failed.public long localSizeLong(CachePeekMode[] peekModes) throws IgniteCheckedException
localSizeLong in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>peekModes - Peek modes.IgniteCheckedException - If failed.public long localSizeLong(int partition,
CachePeekMode[] peekModes)
throws IgniteCheckedException
localSizeLong in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>partition - partition.peekModes - Peek modes.IgniteCheckedException - If failed.public int size(CachePeekMode[] peekModes) throws IgniteCheckedException
size in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>peekModes - Peek modes.IgniteCheckedException - If failed.public long sizeLong(CachePeekMode[] peekModes) throws IgniteCheckedException
sizeLong in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>peekModes - Peek modes.IgniteCheckedException - If failed.public long sizeLong(int partition,
CachePeekMode[] peekModes)
throws IgniteCheckedException
sizeLong in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>partition - partitionpeekModes - Peek modes.IgniteCheckedException - If failed.public org.apache.ignite.internal.IgniteInternalFuture<Integer> sizeAsync(CachePeekMode[] peekModes)
public org.apache.ignite.internal.IgniteInternalFuture<Long> sizeLongAsync(CachePeekMode[] peekModes)
public org.apache.ignite.internal.IgniteInternalFuture<Long> sizeLongAsync(int partition, CachePeekMode[] peekModes)
public int nearSize()
Note that for LOCAL non-distributed caches this method will always return 0
nearSize in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>0 if cache is not CacheMode.PARTITIONED.public int primarySize()
CacheMode.LOCAL non-distributed
cache mode, this method is identical to IgniteInternalCache.size().
For CacheMode.PARTITIONED and CacheMode.REPLICATED modes, this method will
return number of primary entries cached on this node (excluding any backups). The complexity of
this method is O(P), where P is the total number of partitions.
NOTE: this operation is not distributed and returns only the number of primary entries cached on this node.
public long primarySizeLong()
CacheMode.LOCAL
non-distributed cache mode, this method is identical to IgniteInternalCache.size().
For CacheMode.PARTITIONED and CacheMode.REPLICATED modes, this method will
return number of primary entries cached on this node (excluding any backups). The complexity of
this method is O(P), where P is the total number of partitions.
NOTE: this operation is not distributed and returns only the number of primary entries cached on this node.
public CacheConfiguration configuration()
public Affinity affinity()
public CacheMetrics clusterMetrics()
public CacheMetrics clusterMetrics(ClusterGroup grp)
public CacheMetrics localMetrics()
public CacheMetricsMXBean clusterMxBean()
public CacheMetricsMXBean localMxBean()
public long offHeapEntriesCount()
public long offHeapAllocatedSize()
public org.apache.ignite.internal.IgniteInternalFuture<?> rebalance()
CacheConfiguration.getRebalanceDelay() configuration parameter has non-zero value.
When many nodes are started or stopped almost concurrently, it is more efficient to delay
rebalancing until the node topology is stable to make sure that no redundant re-partitioning
happens.
In case ofCacheMode.PARTITIONED caches, for better efficiency user should
usually make sure that new nodes get placed on the same place of consistent hash ring as
the left nodes, and that nodes are restarted before
rebalanceDelay expires. To place nodes
on the same place in consistent hash ring, use
IgniteConfiguration.setConsistentId(Serializable) to make sure that
a node maps to the same hash ID if re-started.
See CacheConfiguration.getRebalanceDelay() for more information on how to configure
rebalance re-partition delay.
public org.apache.ignite.internal.processors.cache.IgniteInternalCache forSubjectId(UUID subjId)
@Nullable public @Nullable Object getForcePrimary(Object key) throws IgniteCheckedException
getForcePrimary in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key to get value for.IgniteCheckedException - If failed.public org.apache.ignite.internal.IgniteInternalFuture getForcePrimaryAsync(Object key)
public Map getAllOutTx(Set keys) throws IgniteCheckedException
getAllOutTx in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keys - Keys to get values for.IgniteCheckedException - If failed.public org.apache.ignite.internal.IgniteInternalFuture<Map<Object,Object>> getAllOutTxAsync(Set keys)
@Nullable public @Nullable javax.cache.expiry.ExpiryPolicy expiry()
public org.apache.ignite.internal.processors.cache.IgniteInternalCache withExpiryPolicy(javax.cache.expiry.ExpiryPolicy plc)
public org.apache.ignite.internal.processors.cache.IgniteInternalCache withNoRetries()
public <K1,V1> org.apache.ignite.internal.processors.cache.IgniteInternalCache<K1,V1> withAllowAtomicOpsInTx()
public org.apache.ignite.internal.processors.cache.GridCacheContext context()
public void localLoadCache(@Nullable
@Nullable IgniteBiPredicate p,
@Nullable
Object... args)
throws IgniteCheckedException
CacheStore.loadCache(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.
localLoadCache in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>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(IgniteBiInClosure, Object...) method.IgniteCheckedException - If loading failed.public org.apache.ignite.internal.IgniteInternalFuture<?> localLoadCacheAsync(@Nullable @Nullable IgniteBiPredicate p, @Nullable Object... args)
CacheStore.loadCache(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.
localLoadCacheAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>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(IgniteBiInClosure, Object...) method.public Collection<Integer> lostPartitions()
public void preloadPartition(int part)
throws IgniteCheckedException
preloadPartition in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>part - Partition.IgniteCheckedException - If failed.public org.apache.ignite.internal.IgniteInternalFuture<?> preloadPartitionAsync(int part) throws IgniteCheckedException
preloadPartitionAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>part - Partition.IgniteCheckedException - If failed.public boolean localPreloadPartition(int part)
throws IgniteCheckedException
localPreloadPartition in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>part - Partition.True if partition was preloaded, false if it doesn't belong to local node.IgniteCheckedException - If failed.public int localEntrySize(Object key) throws IgniteCheckedException
key and corresponding value in the off-heap storage.
The returned value does not include an overhead of the off-heap storage that is required for
- cache id (4 bytes when the cache id is stored in data pages, 0 otherwise),
- entry version (up to 41 bytes, see CacheVersionIO),
- expiration time (8 bytes).
This method will not load a value from the configured CacheStore or from a remote node.
localEntrySize in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Entry key.key or 0 if entry is not found.IgniteCheckedException - If failed.public boolean touch(Object key)
key.touch in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - The key whose associated ttl value is to be updated in accrordance with the specified ExpiryPolicy.true if the ttl value was updated, and false otherwise.IgniteCache.withExpiryPolicy(ExpiryPolicy)public org.apache.ignite.internal.IgniteInternalFuture<Boolean> touchAsync(Object key)
key.touchAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - The key whose associated ttl value is to be updated in accrordance with the specified ExpiryPolicy.true
if the ttl value was updated, and false otherwise.IgniteCache.withExpiryPolicy(ExpiryPolicy)@Nullable
public @Nullable javax.cache.processor.EntryProcessorResult invoke(@Nullable
@Nullable org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion topVer,
Object key,
javax.cache.processor.EntryProcessor entryProcessor,
Object... args)
throws IgniteCheckedException
invoke in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>topVer - Locked topology version.key - Key.entryProcessor - Entry processor.args - Arguments.IgniteCheckedException - If failed.public org.apache.ignite.internal.IgniteInternalFuture<Map> invokeAllAsync(Map map, Object... args)
public Map invokeAll(Map map, Object... args) throws IgniteCheckedException
invokeAll in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>map - Map containing keys and entry processors to be applied to values.args - Arguments.IgniteCheckedException - If failed.public org.apache.ignite.internal.IgniteInternalFuture<Map> invokeAllAsync(Set keys, javax.cache.processor.EntryProcessor entryProcessor, Object... args)
public Map invokeAll(Set keys, javax.cache.processor.EntryProcessor entryProcessor, Object... args) throws IgniteCheckedException
invokeAll in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keys - Keys.entryProcessor - Entry processor.args - Arguments.IgniteCheckedException - If failed.public org.apache.ignite.internal.IgniteInternalFuture<javax.cache.processor.EntryProcessorResult> invokeAsync(Object key, javax.cache.processor.EntryProcessor entryProcessor, Object... args)
@Nullable public @Nullable javax.cache.processor.EntryProcessorResult invoke(Object key, javax.cache.processor.EntryProcessor entryProcessor, Object... args) throws IgniteCheckedException
invoke in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>key - Key.entryProcessor - Entry processor.args - Arguments.IgniteCheckedException - If failed.public Iterator<javax.cache.Cache.Entry<Object,Object>> scanIterator(boolean keepBinary, @Nullable @Nullable IgniteBiPredicate p, long timeout) throws IgniteCheckedException
scanIterator in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keepBinary - Keep binary flag.p - Optional key/value predicate.timeout - Timeout or zero if no timeout.IgniteCheckedException - If failed.public Iterator<javax.cache.Cache.Entry<Object,Object>> scanIterator(boolean keepBinary, @Nullable @Nullable IgniteBiPredicate p) throws IgniteCheckedException
scanIterator in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>keepBinary - Keep binary flag.p - Optional key/value predicate.IgniteCheckedException - If failed.public org.apache.ignite.internal.IgniteInternalFuture<?> removeAllConflictAsync(Map drMap) throws IgniteCheckedException
removeAllConflictAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>drMap - DR map.IgniteCheckedException - If remove failed.public void removeAllConflict(Map drMap) throws IgniteCheckedException
removeAllConflict in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>drMap - DR map.IgniteCheckedException - If remove failed.public org.apache.ignite.internal.IgniteInternalFuture<?> putAllConflictAsync(Map drMap) throws IgniteCheckedException
putAllConflictAsync in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>drMap - DR map.IgniteCheckedException - If put operation failed.public void putAllConflict(Map drMap) throws IgniteCheckedException
putAllConflict in interface org.apache.ignite.internal.processors.cache.IgniteInternalCache<Object,Object>drMap - DR map.IgniteCheckedException - If put operation failed.public org.apache.ignite.internal.processors.cache.IgniteInternalCache keepBinary()
Projection returned by this method will force cache not to deserialize binary objects, so keys and values will be returned from cache API methods without changes. Therefore, signature of the projection can contain only following types:
org.gridgain.grid.binary.BinaryObject for binary classesString and array of StringsUUID and array of UUIDsDate and array of DatesTimestamp and array of Timestamps
For example, if you use Integer as a key and Value class as a value
(which will be stored in binary format), you should acquire following projection
to avoid deserialization:
IgniteInternalCacheprj = cache.keepBinary(); // Value is not deserialized and returned in binary format. GridBinaryObject po = prj.get(1);
Note that this method makes sense only if cache is working in binary mode
(org.apache.ignite.configuration.CacheConfiguration#isBinaryEnabled() returns true. If not,
this method is no-op and will return current projection.
public org.apache.ignite.internal.processors.cache.IgniteInternalCache cache()
GridGain In-Memory Computing Platform : ver. 8.9.26 Release Date : October 16 2025