ignite-96 wip
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2e80f874 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2e80f874 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2e80f874 Branch: refs/heads/ignite-96 Commit: 2e80f874f93e112de6d7838d53593dd5ea7943a0 Parents: 46160c9 Author: Yakov Zhdanov <[email protected]> Authored: Thu Feb 5 18:17:12 2015 +0300 Committer: Yakov Zhdanov <[email protected]> Committed: Thu Feb 5 18:17:12 2015 +0300 ---------------------------------------------------------------------- .../org/apache/ignite/cache/CacheEntry.java | 623 ---------------- .../processors/cache/GridCacheAdapter.java | 207 +++--- .../processors/cache/GridCacheEntryEx.java | 42 +- .../processors/cache/GridCacheEntryImpl.java | 729 ------------------- .../cache/GridCacheEvictionEntry.java | 3 +- .../cache/GridCacheEvictionManager.java | 22 +- .../cache/GridCacheFilterEvaluationEntry.java | 400 ---------- .../processors/cache/GridCacheMapEntry.java | 71 +- .../processors/cache/GridCacheProjectionEx.java | 25 +- .../GridPartitionedCacheEntryImpl.java | 423 ----------- .../distributed/dht/GridDhtCacheEntry.java | 13 - .../distributed/dht/GridDhtCacheEntryImpl.java | 172 ----- .../dht/atomic/GridDhtAtomicCacheEntry.java | 19 +- .../colocated/GridDhtColocatedCacheEntry.java | 10 - .../distributed/near/GridNearCacheEntry.java | 14 +- .../local/atomic/GridLocalAtomicCache.java | 11 +- 16 files changed, 182 insertions(+), 2602 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e80f874/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java deleted file mode 100644 index c9f8085..0000000 --- a/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java +++ /dev/null @@ -1,623 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache; - -import org.apache.ignite.*; -import org.apache.ignite.internal.*; -import org.apache.ignite.internal.processors.cache.*; -import org.apache.ignite.lang.*; -import org.apache.ignite.transactions.*; -import org.jetbrains.annotations.*; - -import java.util.*; -import java.util.Map.*; -import java.util.concurrent.*; - -/** - * This interface provides a rich API for working with individual cache entries. It - * includes the following main functionality: - * <ul> - * <li> - * Various {@code 'get(..)'} methods to synchronously or asynchronously get values from cache. - * All {@code 'get(..)'} methods are transactional and will participate in an ongoing transaction - * if there is one. - * </li> - * <li> - * Various {@code 'set(..)'}, {@code 'setIfAbsent(..)'}, and {@code 'replace(..)'} methods to - * synchronously or asynchronously put single or multiple entries into cache. - * All these methods are transactional and will participate in an ongoing transaction - * if there is one. - * </li> - * <li> - * Various {@code 'remove(..)'} methods to synchronously or asynchronously remove single or multiple keys - * from cache. All {@code 'remove(..)'} methods are transactional and will participate in an ongoing transaction - * if there is one. - * </li> - * <li> - * Various {@code 'invalidate(..)'} methods to set cached values to {@code null}. - * <li> - * <li> - * Various {@code 'isLocked(..)'} methods to check on distributed locks on a single or multiple keys - * in cache. All locking methods are not transactional and will not enlist keys into ongoing transaction, - * if any. - * </li> - * <li> - * Various {@code 'peek(..)'} methods to peek at values in global or transactional memory, swap - * storage, or persistent storage. - * </li> - * <li> - * Various {@code 'reload(..)'} methods to reload latest values from persistent storage. - * </li> - * <li> - * Method {@link #evict()} to evict elements from cache, and optionally store - * them in underlying swap storage for later access. All {@code 'evict(..)'} methods are not - * transactional and will not enlist evicted keys into ongoing transaction, if any. - * </li> - * <li> - * Methods for {@link #timeToLive(long)} to change or lookup entry's time to live. - * </ul> - * <h1 class="header">Extended Put And Remove Methods</h1> - * All methods that end with {@code 'x'} provide the same functionality as their sibling - * methods that don't end with {@code 'x'}, however instead of returning a previous value they - * return a {@code boolean} flag indicating whether operation succeeded or not. Returning - * a previous value may involve a network trip or a persistent store lookup and should be - * avoided whenever not needed. - * <h1 class="header">Predicate Filters</h1> - * All filters passed into methods on this API are checked <b>atomically</b>. In other words the value - * of cache entry is guaranteed not to change throughout the cache operation. - * <h1 class="header">Transactions</h1> - * Cache API supports distributed transactions. All {@code 'get(..)'}, {@code 'put(..)'}, {@code 'replace(..)'}, - * and {@code 'remove(..)'} operations are transactional and will participate in an ongoing transaction. - * Other methods like {@code 'peek(..)'} may be transaction-aware, i.e. check in-transaction entries first, but - * will not affect the current state of transaction. See {@link IgniteTx} documentation for more information - * about transactions. - * @param <K> Key type. - * @param <V> Value type. - */ -public interface CacheEntry<K, V> extends Map.Entry<K, V>, javax.cache.Cache.Entry<K, V> { - /** - * Cache projection to which this entry belongs. Note that entry and its - * parent projections have same flags and filters. - * - * @return Cache projection for the cache to which this entry belongs. - */ - public CacheProjection<K, V> projection(); - - /** - * This method has the same semantic as {@link CacheProjection#peek(Object)} method. - * - * @return See {@link CacheProjection#peek(Object)}. - */ - @Nullable public V peek(); - - /** - * This method has the same semantic as - * {@link CacheProjection#peek(Object, Collection)} method. - * - * @param modes See {@link CacheProjection#peek(Object, Collection)}. - * @return See {@link CacheProjection#peek(Object, Collection)}. - * @throws IgniteCheckedException See {@link CacheProjection#peek(Object, Collection)}. - */ - @Nullable public V peek(@Nullable Collection<GridCachePeekMode> modes) throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#reload(Object)} method. - * - * @return See {@link CacheProjection#reload(Object)}. - * @throws IgniteCheckedException See {@link CacheProjection#reload(Object)}. - */ - @Nullable public V reload() throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#reloadAsync(Object)} method. - * - * @return See {@link CacheProjection#reloadAsync(Object)}. - */ - public IgniteInternalFuture<V> reloadAsync(); - - /** - * This method has the same semantic as - * {@link CacheProjection#isLocked(Object)} method. - * - * @return See {@link CacheProjection#isLocked(Object)}. - */ - public boolean isLocked(); - - /** - * This method has the same semantic as - * {@link CacheProjection#isLockedByThread(Object)} method. - * - * @return See {@link CacheProjection#isLockedByThread(Object)}. - */ - public boolean isLockedByThread(); - - /** - * Gets current version of this cache entry. - * - * @return Version of this cache entry. - */ - public Object version(); - - /** - * Gets expiration time for this entry. - * - * @return Absolute time when this value expires. - */ - public long expirationTime(); - - /** - * Gets time to live, i.e. maximum life time, of this entry in milliseconds. - * - * @return Time to live value for this entry. - */ - public long timeToLive(); - - /** - * Sets time to live, i.e. maximum life time, of this entry in milliseconds. - * Note that this method is transactional - if entry is enlisted into a transaction, - * then time-to-live will not be set until transaction commit. - * <p> - * When called outside the transaction, this method will have no effect until the - * next update operation. - * - * @param ttl Time to live value for this entry. - */ - public void timeToLive(long ttl); - - /** - * Gets the flag indicating current node's primary ownership for this entry. - * <p> - * Note, that this value is dynamic and may change with grid topology changes. - * - * @return {@code True} if current grid node is the primary owner for this entry. - */ - public boolean primary(); - - /** - * Gets the flag indicating if current node is backup for this entry. - * <p> - * Note, that this value is dynamic and may change with grid topology changes. - * - * @return {@code True} if current grid node is the backup for this entry. - */ - public boolean backup(); - - /** - * Gets affinity partition id for this entry. - * - * @return Partition id. - */ - public int partition(); - - /** - * This method has the same semantic as {@link #get()} method, however it - * wraps {@link IgniteCheckedException} into {@link IgniteException} if failed in order to - * comply with {@link Entry} interface. - * - * @return See {@link #get()} - */ - @Nullable @Override public V getValue(); - - /** - * This method has the same semantic as - * {@link CacheProjection#get(Object)} method. - * - * @return See {@link CacheProjection#get(Object)}. - * @throws IgniteCheckedException See {@link CacheProjection#get(Object)}. - */ - @Nullable public V get() throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#getAsync(Object)} method. - * - * @return See {@link CacheProjection#getAsync(Object)}. - */ - public IgniteInternalFuture<V> getAsync(); - - /** - * This method has the same semantic as {@link #set(Object, org.apache.ignite.lang.IgnitePredicate[])} method, however it - * wraps {@link IgniteCheckedException} into {@link IgniteException} if failed in order to - * comply with {@link Entry} interface. - * - * @return See {@link #set(Object, org.apache.ignite.lang.IgnitePredicate[])} - */ - @Nullable @Override public V setValue(V val); - - /** - * This method has the same semantic as - * {@link CacheProjection#put(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} method. - * - * @param val See {@link CacheProjection#put(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} - * @param filter See {@link CacheProjection#put(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @return See {@link CacheProjection#put(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @throws IgniteCheckedException See {@link CacheProjection#put(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - */ - @Nullable public V set(V val, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#putAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} method. - * - * @param val See {@link CacheProjection#putAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} - * @param filter See {@link CacheProjection#putAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @return See {@link CacheProjection#putAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - */ - public IgniteInternalFuture<V> setAsync(V val, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter); - - /** - * This method has the same semantic as - * {@link CacheProjection#putIfAbsent(Object, Object)} method. - * - * @param val See {@link CacheProjection#putIfAbsent(Object, Object)} - * @return See {@link CacheProjection#putIfAbsent(Object, Object)}. - * @throws IgniteCheckedException See {@link CacheProjection#putIfAbsent(Object, Object)}. - */ - @Nullable public V setIfAbsent(V val) throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#putIfAbsentAsync(Object, Object)} method. - * - * @param val See {@link CacheProjection#putIfAbsentAsync(Object, Object)} - * @return See {@link CacheProjection#putIfAbsentAsync(Object, Object)}. - */ - public IgniteInternalFuture<V> setIfAbsentAsync(V val); - - /** - * This method has the same semantic as - * {@link CacheProjection#putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} method. - * - * @param val See {@link CacheProjection#putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} - * @param filter See {@link CacheProjection#putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @return See {@link CacheProjection#putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @throws IgniteCheckedException See {@link CacheProjection#putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - */ - public boolean setx(V val, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) - throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#putxAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} method. - * - * @param val See {@link CacheProjection#putxAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} - * @param filter See {@link CacheProjection#putxAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @return See {@link CacheProjection#putxAsync(Object, Object, org.apache.ignite.lang.IgnitePredicate[])}. - */ - public IgniteInternalFuture<Boolean> setxAsync(V val, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter); - - /** - * This method has the same semantic as - * {@link CacheProjection#putxIfAbsent(Object, Object)} method. - * - * @param val See {@link CacheProjection#putxIfAbsent(Object, Object)} - * @return See {@link CacheProjection#putxIfAbsent(Object, Object)}. - * @throws IgniteCheckedException See {@link CacheProjection#putxIfAbsent(Object, Object)}. - */ - public boolean setxIfAbsent(@Nullable V val) throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#putxIfAbsentAsync(Object, Object)} method. - * - * @param val See {@link CacheProjection#putxIfAbsentAsync(Object, Object)} - * @return See {@link CacheProjection#putxIfAbsentAsync(Object, Object)}. - */ - public IgniteInternalFuture<Boolean> setxIfAbsentAsync(V val); - - /** - * This method has the same semantic as - * {@link CacheProjection#replace(Object, Object)} method. - * - * @param val See {@link CacheProjection#replace(Object, Object)} - * @return See {@link CacheProjection#replace(Object, Object)}. - * @throws IgniteCheckedException See {@link CacheProjection#replace(Object, Object)}. - */ - @Nullable public V replace(V val) throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#replaceAsync(Object, Object)} method. - * - * @param val See {@link CacheProjection#replaceAsync(Object, Object)} - * @return See {@link CacheProjection#replaceAsync(Object, Object)}. - */ - public IgniteInternalFuture<V> replaceAsync(V val); - - /** - * This method has the same semantic as - * {@link CacheProjection#replacex(Object, Object)} method. - * - * @param val See {@link CacheProjection#replacex(Object, Object)} - * @return See {@link CacheProjection#replacex(Object, Object)}. - * @throws IgniteCheckedException See {@link CacheProjection#replacex(Object, Object)}. - */ - public boolean replacex(V val) throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#replacexAsync(Object, Object)} method. - * - * @param val See {@link CacheProjection#replacexAsync(Object, Object)} - * @return See {@link CacheProjection#replacexAsync(Object, Object)}. - */ - public IgniteInternalFuture<Boolean> replacexAsync(V val); - - /** - * This method has the same semantic as - * {@link CacheProjection#replace(Object, Object, Object)} method. - * - * @param oldVal See {@link CacheProjection#replace(Object, Object, Object)} - * @param newVal See {@link CacheProjection#replace(Object, Object, Object)} - * @return See {@link CacheProjection#replace(Object, Object)}. - * @throws IgniteCheckedException See {@link CacheProjection#replace(Object, Object)}. - */ - public boolean replace(V oldVal, V newVal) throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#replaceAsync(Object, Object, Object)} method. - * - * @param oldVal See {@link CacheProjection#replaceAsync(Object, Object, Object)} - * @param newVal See {@link CacheProjection#replaceAsync(Object, Object, Object)} - * @return See {@link CacheProjection#replaceAsync(Object, Object)}. - */ - public IgniteInternalFuture<Boolean> replaceAsync(V oldVal, V newVal); - - /** - * This method has the same semantic as - * {@link CacheProjection#remove(Object, org.apache.ignite.lang.IgnitePredicate[])} method. - * - * @param filter See {@link CacheProjection#remove(Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @return See {@link CacheProjection#remove(Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @throws IgniteCheckedException See {@link CacheProjection#remove(Object, org.apache.ignite.lang.IgnitePredicate[])}. - */ - @Nullable public V remove(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#removeAsync(Object, org.apache.ignite.lang.IgnitePredicate[])} method. - * - * @param filter See {@link CacheProjection#removeAsync(Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @return See {@link CacheProjection#removeAsync(Object, org.apache.ignite.lang.IgnitePredicate[])}. - */ - public IgniteInternalFuture<V> removeAsync(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter); - - /** - * This method has the same semantic as - * {@link CacheProjection#removex(Object, org.apache.ignite.lang.IgnitePredicate[])} method. - * - * @param filter See {@link CacheProjection#removex(Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @return See {@link CacheProjection#removex(Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @throws IgniteCheckedException See {@link CacheProjection#removex(Object, org.apache.ignite.lang.IgnitePredicate[])}. - */ - public boolean removex(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#removexAsync(Object, org.apache.ignite.lang.IgnitePredicate[])} method. - * - * @param filter See {@link CacheProjection#removexAsync(Object, org.apache.ignite.lang.IgnitePredicate[])}. - * @return See {@link CacheProjection#removexAsync(Object, org.apache.ignite.lang.IgnitePredicate[])}. - */ - public IgniteInternalFuture<Boolean> removexAsync(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter); - - /** - * This method has the same semantic as - * {@link CacheProjection#remove(Object, Object)} method. - * - * @param val See {@link CacheProjection#remove(Object, Object)}. - * @return See {@link CacheProjection#remove(Object, Object)}. - * @throws IgniteCheckedException See {@link CacheProjection#remove(Object, Object)}. - */ - public boolean remove(V val) throws IgniteCheckedException; - - /** - * This method has the same semantic as - * {@link CacheProjection#removeAsync(Object, Object)} method. - * - * @param val See {@link CacheProjection#removeAsync(Object, Object)}. - * @return See {@link CacheProjection#removeAsync(Object, Object)}. - */ - public IgniteInternalFuture<Boolean> removeAsync(V val); - - /** - * This method has the same semantic as - * {@link CacheProjection#evict(Object)} method. - * - * @return See {@link CacheProjection#evict(Object)}. - */ - public boolean evict(); - - /** - * This method has the same semantic as - * {@link CacheProjection#clear(Object)} method. - * - * @return See {@link CacheProjection#clear(Object)}. - */ - public boolean clear(); - - /** - * Optimizes the size of this entry. If entry is expired at the time - * of the call then entry is removed locally. - * - * @throws IgniteCheckedException If failed to compact. - * @return {@code true} if entry was cleared from cache (if value was {@code null}). - */ - public boolean compact() throws IgniteCheckedException; - - /** - * Synchronously acquires lock on a cached object associated with this entry - * only if the passed in filter (if any) passes. This method together with - * filter check will be executed as one atomic operation. - * <h2 class="header">Transactions</h2> - * Locks are not transactional and should not be used from within transactions. - * If you do need explicit locking within transaction, then you should use - * {@link IgniteTxConcurrency#PESSIMISTIC} concurrency control for transaction - * which will acquire explicit locks for relevant cache operations. - * <h2 class="header">Cache Flags</h2> - * This method is not available if any of the following flags are set on projection: - * {@link org.apache.ignite.internal.processors.cache.CacheFlag#LOCAL}, {@link org.apache.ignite.internal.processors.cache.CacheFlag#READ}. - * - * @param timeout Timeout in milliseconds to wait for lock to be acquired - * ({@code '0'} for no expiration). - * @param filter Optional filter to validate prior to acquiring the lock. - * @return {@code True} if all filters passed and lock was acquired, - * {@code false} otherwise. - * @throws IgniteCheckedException If lock acquisition resulted in error. - * @throws org.apache.ignite.internal.processors.cache.CacheFlagException If flags validation failed. - */ - public boolean lock(long timeout, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) - throws IgniteCheckedException; - - /** - * Asynchronously acquires lock on a cached object associated with this entry - * only if the passed in filter (if any) passes. This method together with - * filter check will be executed as one atomic operation. - * <h2 class="header">Transactions</h2> - * Locks are not transactional and should not be used from within transactions. If you do - * need explicit locking within transaction, then you should use - * {@link IgniteTxConcurrency#PESSIMISTIC} concurrency control for transaction - * which will acquire explicit locks for relevant cache operations. - * <h2 class="header">Cache Flags</h2> - * This method is not available if any of the following flags are set on projection: - * {@link org.apache.ignite.internal.processors.cache.CacheFlag#LOCAL}, {@link org.apache.ignite.internal.processors.cache.CacheFlag#READ}. - * - * @param timeout Timeout in milliseconds to wait for lock to be acquired - * ({@code '0'} for no expiration). - * @param filter Optional filter to validate prior to acquiring the lock. - * @return Future for the lock operation. The future will return {@code true} - * whenever all filters pass and locks are acquired before timeout is expired, - * {@code false} otherwise. - * @throws org.apache.ignite.internal.processors.cache.CacheFlagException If flags validation failed. - */ - public IgniteInternalFuture<Boolean> lockAsync(long timeout, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter); - - /** - * Unlocks this entry only if current thread owns the lock. If optional filter - * will not pass, then unlock will not happen. If this entry was never locked by - * current thread, then this method will do nothing. - * <h2 class="header">Transactions</h2> - * Locks are not transactional and should not be used from within transactions. If you do - * need explicit locking within transaction, then you should use - * {@link IgniteTxConcurrency#PESSIMISTIC} concurrency control for transaction - * which will acquire explicit locks for relevant cache operations. - * <h2 class="header">Cache Flags</h2> - * This method is not available if any of the following flags are set on projection: - * {@link org.apache.ignite.internal.processors.cache.CacheFlag#LOCAL}, {@link org.apache.ignite.internal.processors.cache.CacheFlag#READ}. - * - * @param filter Optional filter that needs to pass prior to unlock taking effect. - * @throws IgniteCheckedException If unlock execution resulted in error. - * @throws org.apache.ignite.internal.processors.cache.CacheFlagException If flags validation failed. - */ - public void unlock(IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException; - - /** - * Checks whether entry is currently present in cache or not. If entry is not in - * cache (e.g. has been removed) {@code false} is returned. In this case all - * operations on this entry will cause creation of a new entry in cache. - * - * @return {@code True} if entry is in cache, {@code false} otherwise. - */ - public boolean isCached(); - - /** - * Gets size of serialized key and value in addition to any overhead added by {@code Ignite} itself. - * - * @return size in bytes. - * @throws IgniteCheckedException If failed to evaluate entry size. - */ - public int memorySize() throws IgniteCheckedException; - - /** - * Removes metadata by name. - * - * @param name Name of the metadata to remove. - * @param <V> Type of the value. - * @return Value of removed metadata or {@code null}. - */ - public <V> V removeMeta(String name); - - /** - * Removes metadata only if its current value is equal to {@code val} passed in. - * - * @param name Name of metadata attribute. - * @param val Value to compare. - * @param <V> Value type. - * @return {@code True} if value was removed, {@code false} otherwise. - */ - public <V> boolean removeMeta(String name, V val); - - /** - * Gets metadata by name. - * - * @param name Metadata name. - * @param <V> Type of the value. - * @return Metadata value or {@code null}. - */ - public <V> V meta(String name); - - /** - * Adds given metadata value only if it was absent. - * - * @param name Metadata name. - * @param c Factory closure to produce value to add if it's not attached already. - * Not that unlike {@link #addMeta(String, Object)} method the factory closure will - * not be called unless the value is required and therefore value will only be created - * when it is actually needed. - * @param <V> Type of the value. - * @return {@code null} if new value was put, or current value if put didn't happen. - */ - @Nullable public <V> V putMetaIfAbsent(String name, Callable<V> c); - - /** - * Adds given metadata value only if it was absent. - * - * @param name Metadata name. - * @param val Value to add if it's not attached already. - * @param <V> Type of the value. - * @return {@code null} if new value was put, or current value if put didn't happen. - */ - @Nullable public <V> V putMetaIfAbsent(String name, V val); - - /** - * Adds a new metadata. - * - * @param name Metadata name. - * @param val Metadata value. - * @param <V> Type of the value. - * @return Metadata previously associated with given name, or - * {@code null} if there was none. - */ - @Nullable public <V> V addMeta(String name, V val); - - /** - * Replaces given metadata with new {@code newVal} value only if its current value - * is equal to {@code curVal}. Otherwise, it is no-op. - * - * @param name Name of the metadata. - * @param curVal Current value to check. - * @param newVal New value. - * @return {@code true} if replacement occurred, {@code false} otherwise. - */ - public <V> boolean replaceMeta(String name, V curVal, V newVal); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e80f874/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index 744b441..c62cbef 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@ -53,6 +53,7 @@ import org.jdk8.backport.*; import org.jetbrains.annotations.*; import javax.cache.*; +import javax.cache.Cache.*; import javax.cache.expiry.*; import javax.cache.processor.*; import java.io.*; @@ -370,7 +371,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public IgnitePredicate<CacheEntry<K, V>> predicate() { + @Override public IgnitePredicate<Entry<K, V>> predicate() { return null; } @@ -511,7 +512,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public CacheProjection<K, V> projection(IgnitePredicate<CacheEntry<K, V>> filter) { + @Override public CacheProjection<K, V> projection(IgnitePredicate<Entry<K, V>> filter) { if (filter == null) return this; @@ -563,7 +564,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, IgniteTxIsolation isolation, boolean invalidate, long accessTtl, - IgnitePredicate<CacheEntry<K, V>>[] filter); + IgnitePredicate<Entry<K, V>>[] filter); /** * Post constructor initialization for subclasses. @@ -646,7 +647,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filter. * @return Future. */ - public IgniteInternalFuture<Boolean> containsKeyAsync(K key, @Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + public IgniteInternalFuture<Boolean> containsKeyAsync(K key, @Nullable IgnitePredicate<Entry<K, V>> filter) { return new GridFinishedFuture<>(ctx.kernalContext(), containsKey(key, filter)); } @@ -879,7 +880,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public V peek(K key) { - return peek(key, (IgnitePredicate<CacheEntry<K, V>>)null); + return peek(key, (IgnitePredicate<Entry<K, V>>)null); } /** {@inheritDoc} */ @@ -889,7 +890,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ public Map<K, V> peekAll(@Nullable Collection<? extends K> keys, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable IgnitePredicate<Entry<K, V>>... filter) { return peekAll0(keys, filter, null); } @@ -902,7 +903,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @throws GridCacheFilterFailedException If filter failed. */ @Nullable protected GridTuple<V> peek0(boolean failFast, K key, GridCachePeekMode mode, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws GridCacheFilterFailedException { + @Nullable IgnitePredicate<Entry<K, V>>... filter) throws GridCacheFilterFailedException { A.notNull(key, "key"); if (keyCheck) @@ -966,7 +967,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return Peeked map. */ protected Map<K, V> peekAll0(@Nullable Collection<? extends K> keys, - @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter, @Nullable Collection<K> skipped) { + @Nullable IgnitePredicate<Entry<K, V>>[] filter, @Nullable Collection<K> skipped) { if (F.isEmpty(keys)) return Collections.emptyMap(); @@ -1038,7 +1039,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, @Nullable protected GridTuple<V> peek0(boolean failFast, K key, @Nullable Collection<GridCachePeekMode> modes, IgniteInternalTx<K, V> tx) throws IgniteCheckedException, GridCacheFilterFailedException { if (F.isEmpty(modes)) - return F.t(peek(key, (IgnitePredicate<CacheEntry<K, V>>)null)); + return F.t(peek(key, (IgnitePredicate<Entry<K, V>>)null)); assert modes != null; @@ -1163,18 +1164,18 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public void forEach(IgniteInClosure<CacheEntry<K, V>> vis) { + @Override public void forEach(IgniteInClosure<Entry<K, V>> vis) { A.notNull(vis, "vis"); - for (CacheEntry<K, V> e : entrySet()) + for (Entry<K, V> e : entrySet()) vis.apply(e); } /** {@inheritDoc} */ - @Override public boolean forAll(IgnitePredicate<CacheEntry<K, V>> vis) { + @Override public boolean forAll(IgnitePredicate<Entry<K, V>> vis) { A.notNull(vis, "vis"); - for (CacheEntry<K, V> e : entrySet()) + for (Entry<K, V> e : entrySet()) if (!vis.apply(e)) return false; @@ -1191,7 +1192,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Nullable @Override public CacheEntry<K, V> entry(K key) { + @Nullable @Override public Entry<K, V> entry(K key) { A.notNull(key, "key"); if (keyCheck) @@ -1301,54 +1302,54 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public Set<CacheEntry<K, V>> entrySet() { - return entrySet((IgnitePredicate<CacheEntry<K, V>>[])null); + @Override public Set<Entry<K, V>> entrySet() { + return entrySet((IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ - @Override public Set<CacheEntry<K, V>> entrySetx(IgnitePredicate<CacheEntry<K, V>>... filter) { + @Override public Set<Entry<K, V>> entrySetx(IgnitePredicate<Entry<K, V>>... filter) { return map.entriesx(filter); } /** {@inheritDoc} */ - @Override public Set<CacheEntry<K, V>> primaryEntrySetx(IgnitePredicate<CacheEntry<K, V>>... filter) { + @Override public Set<Entry<K, V>> primaryEntrySetx(IgnitePredicate<Entry<K, V>>... filter) { return map.entriesx(F.and(filter, F.<K, V>cachePrimary())); } /** {@inheritDoc} */ - @Override public Set<CacheEntry<K, V>> entrySet(int part) { + @Override public Set<Entry<K, V>> entrySet(int part) { throw new UnsupportedOperationException(); } /** {@inheritDoc} */ - @Override public Set<CacheEntry<K, V>> primaryEntrySet() { - return primaryEntrySet((IgnitePredicate<CacheEntry<K, V>>[])null); + @Override public Set<Entry<K, V>> primaryEntrySet() { + return primaryEntrySet((IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @Override public Set<K> keySet() { - return keySet((IgnitePredicate<CacheEntry<K, V>>[])null); + return keySet((IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @Override public Set<K> primaryKeySet() { - return primaryKeySet((IgnitePredicate<CacheEntry<K, V>>[])null); + return primaryKeySet((IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @Override public Collection<V> values() { - return values((IgnitePredicate<CacheEntry<K, V>>[])null); + return values((IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ - public Collection<V> values(IgnitePredicate<CacheEntry<K, V>>... filter) { + public Collection<V> values(IgnitePredicate<Entry<K, V>>... filter) { return map.values(filter); } /** {@inheritDoc} */ @Override public Collection<V> primaryValues() { - return primaryValues((IgnitePredicate<CacheEntry<K, V>>[])null); + return primaryValues((IgnitePredicate<Entry<K, V>>[])null); } /** @@ -1481,7 +1482,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return {@code True} if cleared. */ private boolean clear(GridCacheVersion obsoleteVer, K key, - @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter) { + @Nullable IgnitePredicate<Entry<K, V>>[] filter) { try { if (ctx.portableEnabled()) key = (K)ctx.marshalToPortable(key); @@ -1536,7 +1537,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public boolean compact(K key) throws IgniteCheckedException { - return compact(key, (IgnitePredicate<CacheEntry<K, V>>[])null); + return compact(key, (IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @@ -1560,7 +1561,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return {@code True} if entry was evicted. */ private boolean evictx(K key, GridCacheVersion ver, - @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter) { + @Nullable IgnitePredicate<Entry<K, V>>[] filter) { if (ctx.portableEnabled()) { try { key = (K)ctx.marshalToPortable(key); @@ -1587,7 +1588,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public V get(K key, @Nullable GridCacheEntryEx<K, V> entry, boolean deserializePortable, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + @Nullable IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { String taskName = ctx.kernalContext().job().currentTaskName(); return getAllAsync(F.asList(key), !ctx.config().isReadFromBackup(), /*skip tx*/false, entry, null, taskName, @@ -1634,36 +1635,36 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Nullable @Override public V reload(K key) throws IgniteCheckedException { - return reload(key, (IgnitePredicate<CacheEntry<K, V>>[])null); + return reload(key, (IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> reloadAsync(K key) { - return reloadAsync(key, (IgnitePredicate<CacheEntry<K, V>>[])null); + return reloadAsync(key, (IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @Override public void reloadAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { - reloadAll(keys, (IgnitePredicate<CacheEntry<K, V>>[])null); + reloadAll(keys, (IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys) { - return reloadAllAsync(keys, (IgnitePredicate<CacheEntry<K, V>>[])null); + return reloadAllAsync(keys, (IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @Override public void reloadAll() throws IgniteCheckedException { ctx.denyOnFlags(F.asList(LOCAL, READ)); - reloadAll(keySet(), (IgnitePredicate<CacheEntry<K, V>>[])null); + reloadAll(keySet(), (IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> reloadAllAsync() { ctx.denyOnFlags(F.asList(LOCAL, READ)); - return reloadAllAsync(keySet(), (IgnitePredicate<CacheEntry<K, V>>[])null); + return reloadAllAsync(keySet(), (IgnitePredicate<Entry<K, V>>[])null); } /** @@ -1679,7 +1680,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, public IgniteInternalFuture<Object> readThroughAllAsync(final Collection<? extends K> keys, boolean reload, @Nullable final IgniteInternalTx<K, V> tx, - IgnitePredicate<CacheEntry<K, V>>[] filter, + IgnitePredicate<Entry<K, V>>[] filter, @Nullable UUID subjId, String taskName, final IgniteBiInClosure<K, V> vis) { @@ -1705,7 +1706,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @throws IgniteCheckedException If failed. */ @Nullable public Map<K, V> reloadAll(@Nullable Collection<? extends K> keys, boolean ret, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + @Nullable IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { UUID subjId = ctx.subjectIdPerCall(null); String taskName = ctx.kernalContext().job().currentTaskName(); @@ -1720,7 +1721,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return Future. */ public IgniteInternalFuture<Map<K, V>> reloadAllAsync(@Nullable Collection<? extends K> keys, boolean ret, - @Nullable UUID subjId, String taskName, @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable UUID subjId, String taskName, @Nullable final IgnitePredicate<Entry<K, V>>... filter) { ctx.denyOnFlag(READ); final long topVer = ctx.affinity().affinityTopologyVersion(); @@ -1885,7 +1886,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public boolean evict(K key) { - return evict(key, (IgnitePredicate<CacheEntry<K, V>>[])null); + return evict(key, (IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @@ -1895,7 +1896,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public void evictAll(Collection<? extends K> keys) { - evictAll(keys, (IgnitePredicate<CacheEntry<K, V>>[])null); + evictAll(keys, (IgnitePredicate<Entry<K, V>>[])null); } /** {@inheritDoc} */ @@ -2032,7 +2033,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, @Nullable UUID subjId, String taskName, boolean deserializePortable, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter + @Nullable IgnitePredicate<Entry<K, V>>... filter ) { GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall(); @@ -2060,7 +2061,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, final boolean deserializePortable, final boolean forcePrimary, @Nullable IgniteCacheExpiryPolicy expiry, - @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter + @Nullable final IgnitePredicate<Entry<K, V>>... filter ) { ctx.checkSecurity(GridSecurityPermission.CACHE_READ); @@ -2336,14 +2337,14 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public V put(K key, V val, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) + @Override public V put(K key, V val, @Nullable IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { return put(key, val, null, -1, filter); } /** {@inheritDoc} */ @Nullable @Override public V put(final K key, final V val, @Nullable final GridCacheEntryEx<K, V> cached, - final long ttl, @Nullable final IgnitePredicate<CacheEntry<K, V>>[] filter) throws IgniteCheckedException { + final long ttl, @Nullable final IgnitePredicate<Entry<K, V>>[] filter) throws IgniteCheckedException { boolean statsEnabled = ctx.config().isStatisticsEnabled(); long start = statsEnabled ? System.nanoTime() : 0L; @@ -2375,7 +2376,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public boolean putx(final K key, final V val, @Nullable final GridCacheEntryEx<K, V> cached, - final long ttl, @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + final long ttl, @Nullable final IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { A.notNull(key, "key", val, "val"); if (keyCheck) @@ -2400,7 +2401,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> putAsync(K key, V val, - @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter) { + @Nullable IgnitePredicate<Entry<K, V>>[] filter) { final boolean statsEnabled = ctx.config().isStatisticsEnabled(); final long start = statsEnabled ? System.nanoTime() : 0L; @@ -2415,7 +2416,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> putAsync(final K key, final V val, @Nullable final GridCacheEntryEx<K, V> entry, - final long ttl, @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter) { + final long ttl, @Nullable final IgnitePredicate<Entry<K, V>>... filter) { A.notNull(key, "key", val, "val"); if (keyCheck) @@ -2439,7 +2440,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public boolean putx(final K key, final V val, - final IgnitePredicate<CacheEntry<K, V>>[] filter) throws IgniteCheckedException { + final IgnitePredicate<Entry<K, V>>[] filter) throws IgniteCheckedException { boolean statsEnabled = ctx.config().isStatisticsEnabled(); long start = statsEnabled ? System.nanoTime() : 0L; @@ -2728,7 +2729,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable IgnitePredicate<Entry<K, V>>... filter) { final boolean statsEnabled = ctx.config().isStatisticsEnabled(); final long start = statsEnabled ? System.nanoTime() : 0L; @@ -2744,7 +2745,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> putxAsync(final K key, final V val, @Nullable final GridCacheEntryEx<K, V> entry, final long ttl, - @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable final IgnitePredicate<Entry<K, V>>... filter) { A.notNull(key, "key", val, "val"); if (keyCheck) @@ -3057,7 +3058,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public void putAll(@Nullable final Map<? extends K, ? extends V> m, - final IgnitePredicate<CacheEntry<K, V>>[] filter) throws IgniteCheckedException { + final IgnitePredicate<Entry<K, V>>[] filter) throws IgniteCheckedException { boolean statsEnabled = ctx.config().isStatisticsEnabled(); long start = statsEnabled ? System.nanoTime() : 0L; @@ -3088,7 +3089,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> putAllAsync(final Map<? extends K, ? extends V> m, - @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable final IgnitePredicate<Entry<K, V>>... filter) { if (F.isEmpty(m)) return new GridFinishedFuture<Object>(ctx.kernalContext()); @@ -3111,14 +3112,14 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Nullable @Override public V remove(K key, IgnitePredicate<CacheEntry<K, V>>[] filter) + @Nullable @Override public V remove(K key, IgnitePredicate<Entry<K, V>>[] filter) throws IgniteCheckedException { return remove(key, null, filter); } /** {@inheritDoc} */ @Override public V remove(final K key, @Nullable final GridCacheEntryEx<K, V> entry, - @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + @Nullable final IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { boolean statsEnabled = ctx.config().isStatisticsEnabled(); long start = statsEnabled ? System.nanoTime() : 0L; @@ -3152,7 +3153,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<V> removeAsync(K key, IgnitePredicate<CacheEntry<K, V>>... filter) { + @Override public IgniteInternalFuture<V> removeAsync(K key, IgnitePredicate<Entry<K, V>>... filter) { final boolean statsEnabled = ctx.config().isStatisticsEnabled(); final long start = statsEnabled ? System.nanoTime() : 0L; @@ -3167,7 +3168,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> removeAsync(final K key, @Nullable final GridCacheEntryEx<K, V> entry, - @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable final IgnitePredicate<Entry<K, V>>... filter) { final boolean statsEnabled = ctx.config().isStatisticsEnabled(); final long start = statsEnabled ? System.nanoTime() : 0L; @@ -3199,7 +3200,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public void removeAll(final Collection<? extends K> keys, - final IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + final IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { boolean statsEnabled = ctx.config().isStatisticsEnabled(); long start = statsEnabled ? System.nanoTime() : 0L; @@ -3241,7 +3242,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable final Collection<? extends K> keys, - final IgnitePredicate<CacheEntry<K, V>>... filter) { + final IgnitePredicate<Entry<K, V>>... filter) { final boolean statsEnabled = ctx.config().isStatisticsEnabled(); final long start = statsEnabled ? System.nanoTime() : 0L; @@ -3271,7 +3272,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public boolean removex(final K key, final IgnitePredicate<CacheEntry<K, V>>... filter) + @Override public boolean removex(final K key, final IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { boolean statsEnabled = ctx.config().isStatisticsEnabled(); @@ -3287,7 +3288,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public boolean removex(final K key, @Nullable final GridCacheEntryEx<K, V> entry, - @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + @Nullable final IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { boolean statsEnabled = ctx.config().isStatisticsEnabled(); long start = statsEnabled ? System.nanoTime() : 0L; @@ -3316,7 +3317,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<Boolean> removexAsync(K key, IgnitePredicate<CacheEntry<K, V>>... filter) { + @Override public IgniteInternalFuture<Boolean> removexAsync(K key, IgnitePredicate<Entry<K, V>>... filter) { A.notNull(key, "key"); return removexAsync(key, null, filter); @@ -3324,7 +3325,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> removexAsync(final K key, @Nullable final GridCacheEntryEx<K, V> entry, - @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable final IgnitePredicate<Entry<K, V>>... filter) { final boolean statsEnabled = ctx.config().isStatisticsEnabled(); final long start = statsEnabled ? System.nanoTime() : 0L; @@ -3598,13 +3599,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public void removeAll(IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + @Override public void removeAll(IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { ctx.denyOnLocalRead(); if (F.isEmptyOrNulls(filter)) filter = ctx.trueArray(); - final IgnitePredicate<CacheEntry<K, V>>[] p = filter; + final IgnitePredicate<Entry<K, V>>[] p = filter; syncOp(new SyncInOp(false) { @Override public void inOp(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException { @@ -3618,7 +3619,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<?> removeAllAsync(final IgnitePredicate<CacheEntry<K, V>>... filter) { + @Override public IgniteInternalFuture<?> removeAllAsync(final IgnitePredicate<Entry<K, V>>... filter) { ctx.denyOnLocalRead(); final Set<? extends K> keys = keySet(filter); @@ -3660,7 +3661,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public boolean lock(K key, long timeout, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + @Nullable IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { A.notNull(key, "key"); return lockAll(Collections.singletonList(key), timeout, filter); @@ -3668,7 +3669,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public boolean lockAll(@Nullable Collection<? extends K> keys, long timeout, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + @Nullable IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { if (F.isEmpty(keys)) return true; @@ -3698,7 +3699,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> lockAsync(K key, long timeout, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable IgnitePredicate<Entry<K, V>>... filter) { A.notNull(key, "key"); if (keyCheck) @@ -3708,7 +3709,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public void unlock(K key, IgnitePredicate<CacheEntry<K, V>>... filter) + @Override public void unlock(K key, IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { A.notNull(key, "key"); @@ -4072,7 +4073,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Nullable @Override public CacheEntry<K, V> randomEntry() { + @Nullable @Override public Entry<K, V> randomEntry() { GridCacheMapEntry<K, V> e = map.randomEntry(); return e == null || e.obsolete() ? null : e.wrap(true); @@ -4109,7 +4110,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public Iterator<CacheEntry<K, V>> iterator() { + @Override public Iterator<Entry<K, V>> iterator() { return entrySet().iterator(); } @@ -4671,7 +4672,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filters to evaluate. */ public void clearAll0(Collection<? extends K> keys, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable IgnitePredicate<Entry<K, V>>... filter) { ctx.denyOnFlag(READ); ctx.checkSecurity(GridSecurityPermission.CACHE_REMOVE); @@ -4692,7 +4693,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filters to evaluate. * @return {@code True} if cleared. */ - public boolean clear0(K key, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + public boolean clear0(K key, @Nullable IgnitePredicate<Entry<K, V>>... filter) { A.notNull(key, "key"); if (keyCheck) @@ -4710,7 +4711,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return {@code True} if compacted. * @throws IgniteCheckedException If failed. */ - public boolean compact(K key, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) + public boolean compact(K key, @Nullable IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { ctx.denyOnFlag(READ); @@ -4741,7 +4742,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filters to evaluate. * @return {@code True} if evicted. */ - public boolean evict(K key, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + public boolean evict(K key, @Nullable IgnitePredicate<Entry<K, V>>... filter) { A.notNull(key, "key"); if (keyCheck) @@ -4757,7 +4758,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filters to evaluate. */ public void evictAll(Collection<? extends K> keys, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable IgnitePredicate<Entry<K, V>>... filter) { A.notNull(keys, "keys"); ctx.denyOnFlag(READ); @@ -4789,7 +4790,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filters to evaluate. * @return {@code True} if contains key. */ - public boolean containsKey(K key, @Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + public boolean containsKey(K key, @Nullable IgnitePredicate<Entry<K, V>> filter) { A.notNull(key, "key"); if (keyCheck) @@ -4823,7 +4824,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return {@code True} if contains all keys. */ public boolean containsAllKeys(@Nullable Collection<? extends K> keys, - @Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + @Nullable IgnitePredicate<Entry<K, V>> filter) { if (F.isEmpty(keys)) return true; @@ -4843,7 +4844,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return {@code True} if cache contains any of given keys. */ public boolean containsAnyKeys(@Nullable Collection<? extends K> keys, - @Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + @Nullable IgnitePredicate<Entry<K, V>> filter) { if (F.isEmpty(keys)) return true; @@ -4863,7 +4864,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filter to evaluate. * @return {@code True} if contains value. */ - public boolean containsValue(V val, @Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + public boolean containsValue(V val, @Nullable IgnitePredicate<Entry<K, V>> filter) { A.notNull(val, "val"); validateCacheValue(val); @@ -4877,7 +4878,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return {@code True} if contains all given values. */ public boolean containsAllValues(@Nullable Collection<? extends V> vals, - @Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + @Nullable IgnitePredicate<Entry<K, V>> filter) { if (F.isEmpty(vals)) return true; @@ -4892,7 +4893,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return {@code True} if contains any of given values. */ public boolean containsAnyValues(@Nullable Collection<? extends V> vals, - @Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + @Nullable IgnitePredicate<Entry<K, V>> filter) { if (F.isEmpty(vals)) return true; @@ -4906,7 +4907,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filter to evaluate. * @return Peeked value. */ - public V peek(K key, @Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + public V peek(K key, @Nullable IgnitePredicate<Entry<K, V>> filter) { try { GridTuple<V> peek = peek0(false, key, SMART, filter); @@ -4925,7 +4926,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filters to evaluate. * @return Entry set. */ - public Set<CacheEntry<K, V>> entrySet(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + public Set<Entry<K, V>> entrySet(@Nullable IgnitePredicate<Entry<K, V>>... filter) { return map.entries(filter); } @@ -4935,8 +4936,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Entry filter. * @return Entry set. */ - public Set<CacheEntry<K, V>> entrySet(@Nullable Collection<? extends K> keys, - @Nullable IgnitePredicate<K> keyFilter, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + public Set<Entry<K, V>> entrySet(@Nullable Collection<? extends K> keys, + @Nullable IgnitePredicate<K> keyFilter, @Nullable IgnitePredicate<Entry<K, V>>... filter) { if (F.isEmpty(keys)) return emptySet(); @@ -4950,8 +4951,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filters to evaluate. * @return Primary entry set. */ - public Set<CacheEntry<K, V>> primaryEntrySet( - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + public Set<Entry<K, V>> primaryEntrySet( + @Nullable IgnitePredicate<Entry<K, V>>... filter) { return map.entries(F.and(filter, F.<K, V>cachePrimary())); } @@ -4959,7 +4960,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filters to evaluate. * @return Key set. */ - public Set<K> keySet(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + public Set<K> keySet(@Nullable IgnitePredicate<Entry<K, V>>... filter) { return map.keySet(filter); } @@ -4967,7 +4968,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Primary key set. * @return Primary key set. */ - public Set<K> primaryKeySet(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + public Set<K> primaryKeySet(@Nullable IgnitePredicate<Entry<K, V>>... filter) { return map.keySet(F.and(filter, F.<K, V>cachePrimary())); } @@ -4975,7 +4976,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filters to evaluate. * @return Primary values. */ - public Collection<V> primaryValues(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + public Collection<V> primaryValues(@Nullable IgnitePredicate<Entry<K, V>>... filter) { return map.values(F.and(filter, F.<K, V>cachePrimary())); } @@ -4985,7 +4986,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @throws IgniteCheckedException If failed. */ public void compactAll(@Nullable Iterable<K> keys, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + @Nullable IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { ctx.denyOnFlag(READ); if (keys != null) { @@ -5000,7 +5001,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return Cached value. * @throws IgniteCheckedException If failed. */ - @Nullable public V get(K key, boolean deserializePortable, @Nullable IgnitePredicate<CacheEntry<K, V>> filter) + @Nullable public V get(K key, boolean deserializePortable, @Nullable IgnitePredicate<Entry<K, V>> filter) throws IgniteCheckedException { return getAllAsync(F.asList(key), deserializePortable, filter).get().get(key); } @@ -5011,7 +5012,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return Read operation future. */ public final IgniteInternalFuture<V> getAsync(final K key, boolean deserializePortable, - @Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + @Nullable IgnitePredicate<Entry<K, V>> filter) { ctx.denyOnFlag(LOCAL); try { @@ -5036,7 +5037,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @throws IgniteCheckedException If read failed. */ public Map<K, V> getAll(Collection<? extends K> keys, boolean deserializePortable, - IgnitePredicate<CacheEntry<K, V>> filter) throws IgniteCheckedException { + IgnitePredicate<Entry<K, V>> filter) throws IgniteCheckedException { ctx.denyOnFlag(LOCAL); checkJta(); @@ -5050,7 +5051,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return Reloaded value. * @throws IgniteCheckedException If failed. */ - @Nullable public V reload(K key, @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) + @Nullable public V reload(K key, @Nullable IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { ctx.denyOnFlags(F.asList(LOCAL, READ)); @@ -5085,7 +5086,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @throws IgniteCheckedException If failed. */ public void reloadAll(@Nullable Collection<? extends K> keys, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + @Nullable IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { reloadAll(keys, false, filter); } @@ -5095,7 +5096,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return Reload future. */ public IgniteInternalFuture<?> reloadAllAsync(@Nullable Collection<? extends K> keys, - @Nullable IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable IgnitePredicate<Entry<K, V>>... filter) { UUID subjId = ctx.subjectIdPerCall(null); String taskName = ctx.kernalContext().job().currentTaskName(); @@ -5109,7 +5110,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return Reload future. */ public IgniteInternalFuture<V> reloadAsync(final K key, - @Nullable final IgnitePredicate<CacheEntry<K, V>>... filter) { + @Nullable final IgnitePredicate<Entry<K, V>>... filter) { ctx.denyOnFlags(F.asList(LOCAL, READ)); return ctx.closures().callLocalSafe(ctx.projectSafe(new Callable<V>() { @@ -5123,7 +5124,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filter to evaluate. * @throws IgniteCheckedException If reload failed. */ - public final void reloadAll(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + public final void reloadAll(@Nullable IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException { ctx.denyOnFlag(READ); Set<K> keys = keySet(); @@ -5137,7 +5138,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filter to evaluate. * @return Reload future. */ - public IgniteInternalFuture<?> reloadAllAsync(@Nullable final IgnitePredicate<CacheEntry<K, V>> filter) { + public IgniteInternalFuture<?> reloadAllAsync(@Nullable final IgnitePredicate<Entry<K, V>> filter) { ctx.denyOnFlag(READ); return ctx.closures().callLocalSafe(ctx.projectSafe(new GPC() { @@ -5157,7 +5158,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, */ public IgniteInternalFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys, boolean deserializePortable, - @Nullable IgnitePredicate<CacheEntry<K, V>> filter) { + @Nullable IgnitePredicate<Entry<K, V>> filter) { String taskName = ctx.kernalContext().job().currentTaskName(); if (ctx.portableEnabled() && !F.isEmpty(keys)) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e80f874/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java index 6df49e5..899ec4c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.*; -import org.apache.ignite.cache.*; import org.apache.ignite.internal.processors.cache.distributed.*; import org.apache.ignite.internal.processors.cache.transactions.*; import org.apache.ignite.internal.processors.cache.version.*; @@ -27,6 +26,7 @@ import org.apache.ignite.internal.util.lang.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*; +import javax.cache.Cache.*; import javax.cache.expiry.*; import javax.cache.processor.*; import java.util.*; @@ -133,25 +133,17 @@ public interface GridCacheEntryEx<K, V> { public V rawPut(V val, long ttl); /** - * Wraps this map entry into cache entry. - - * @param prjAware {@code true} if entry should inherit projection properties. - * @return Wrapped entry. - */ - public CacheEntry<K, V> wrap(boolean prjAware); - - /** * Wraps this map entry into cache entry for filter evaluation inside entry lock. * * @return Wrapped entry. * @throws IgniteCheckedException If failed. */ - public CacheEntry<K, V> wrapFilterLocked() throws IgniteCheckedException; + public Entry<K, V> wrapFilterLocked() throws IgniteCheckedException; /** * @return Entry which is safe to pass into eviction policy. */ - public CacheEntry<K, V> evictWrap(); + public Entry<K, V> evictWrap(); /** * @return Not-null version if entry is obsolete. @@ -199,7 +191,7 @@ public interface GridCacheEntryEx<K, V> { * @throws IgniteCheckedException If swap could not be released. * @throws GridCacheEntryRemovedException If entry was removed. */ - public boolean invalidate(@Nullable IgnitePredicate<CacheEntry<K, V>>[] filter) + public boolean invalidate(@Nullable IgnitePredicate<Entry<K, V>>[] filter) throws GridCacheEntryRemovedException, IgniteCheckedException; /** @@ -210,7 +202,7 @@ public interface GridCacheEntryEx<K, V> { * @throws IgniteCheckedException If operation failed. * @return {@code true} if entry was not being used and could be removed. */ - public boolean compact(@Nullable IgnitePredicate<CacheEntry<K, V>>[] filter) + public boolean compact(@Nullable IgnitePredicate<Entry<K, V>>[] filter) throws GridCacheEntryRemovedException, IgniteCheckedException; /** @@ -221,7 +213,7 @@ public interface GridCacheEntryEx<K, V> { * @throws IgniteCheckedException In case of error. */ public boolean evictInternal(boolean swap, GridCacheVersion obsoleteVer, - @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter) throws IgniteCheckedException; + @Nullable IgnitePredicate<Entry<K, V>>[] filter) throws IgniteCheckedException; /** * Evicts entry when batch evict is performed. When called, does not write entry data to swap, but instead @@ -302,7 +294,7 @@ public interface GridCacheEntryEx<K, V> { UUID subjId, Object transformClo, String taskName, - IgnitePredicate<CacheEntry<K, V>>[] filter, + IgnitePredicate<Entry<K, V>>[] filter, @Nullable IgniteCacheExpiryPolicy expiryPlc) throws IgniteCheckedException, GridCacheEntryRemovedException, GridCacheFilterFailedException; @@ -314,7 +306,7 @@ public interface GridCacheEntryEx<K, V> { * @throws IgniteCheckedException If reload failed. * @throws GridCacheEntryRemovedException If entry has been removed. */ - @Nullable public V innerReload(IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException, + @Nullable public V innerReload(IgnitePredicate<Entry<K, V>>... filter) throws IgniteCheckedException, GridCacheEntryRemovedException; /** @@ -352,7 +344,7 @@ public interface GridCacheEntryEx<K, V> { boolean evt, boolean metrics, long topVer, - IgnitePredicate<CacheEntry<K, V>>[] filter, + IgnitePredicate<Entry<K, V>>[] filter, GridDrType drType, long drExpireTime, @Nullable GridCacheVersion explicitVer, @@ -388,7 +380,7 @@ public interface GridCacheEntryEx<K, V> { boolean evt, boolean metrics, long topVer, - IgnitePredicate<CacheEntry<K, V>>[] filter, + IgnitePredicate<Entry<K, V>>[] filter, GridDrType drType, @Nullable GridCacheVersion explicitVer, @Nullable UUID subjId, @@ -443,7 +435,7 @@ public interface GridCacheEntryEx<K, V> { boolean metrics, boolean primary, boolean checkVer, - @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter, + @Nullable IgnitePredicate<Entry<K, V>>[] filter, GridDrType drType, long drTtl, long drExpireTime, @@ -484,7 +476,7 @@ public interface GridCacheEntryEx<K, V> { @Nullable ExpiryPolicy expiryPlc, boolean evt, boolean metrics, - @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter, + @Nullable IgnitePredicate<Entry<K, V>>[] filter, boolean intercept, @Nullable UUID subjId, String taskName @@ -502,7 +494,7 @@ public interface GridCacheEntryEx<K, V> { * @return {@code True} if entry was not being used, passed the filter and could be removed. */ public boolean clear(GridCacheVersion ver, boolean readers, - @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter) throws IgniteCheckedException; + @Nullable IgnitePredicate<Entry<K, V>>[] filter) throws IgniteCheckedException; /** * This locks is called by transaction manager during prepare step @@ -584,7 +576,7 @@ public interface GridCacheEntryEx<K, V> { * @return Value. * @throws GridCacheEntryRemovedException If entry has been removed. */ - @Nullable public V peek(GridCachePeekMode mode, IgnitePredicate<CacheEntry<K, V>>... filter) + @Nullable public V peek(GridCachePeekMode mode, IgnitePredicate<Entry<K, V>>... filter) throws GridCacheEntryRemovedException; /** @@ -609,7 +601,7 @@ public interface GridCacheEntryEx<K, V> { * @return Value. * @throws GridCacheEntryRemovedException If entry has been removed. */ - @Nullable public V peek(Collection<GridCachePeekMode> modes, IgnitePredicate<CacheEntry<K, V>>... filter) + @Nullable public V peek(Collection<GridCachePeekMode> modes, IgnitePredicate<Entry<K, V>>... filter) throws GridCacheEntryRemovedException; /** @@ -622,7 +614,7 @@ public interface GridCacheEntryEx<K, V> { * @throws GridCacheFilterFailedException If {@code failFast} is {@code true} and * filter didn't pass. */ - @Nullable public V peekFailFast(GridCachePeekMode mode, IgnitePredicate<CacheEntry<K, V>>... filter) + @Nullable public V peekFailFast(GridCachePeekMode mode, IgnitePredicate<Entry<K, V>>... filter) throws GridCacheEntryRemovedException, GridCacheFilterFailedException; /** @@ -637,7 +629,7 @@ public interface GridCacheEntryEx<K, V> { */ @SuppressWarnings({"RedundantTypeArguments"}) @Nullable public GridTuple<V> peek0(boolean failFast, GridCachePeekMode mode, - @Nullable IgnitePredicate<CacheEntry<K, V>>[] filter, @Nullable IgniteInternalTx<K, V> tx) + @Nullable IgnitePredicate<Entry<K, V>>[] filter, @Nullable IgniteInternalTx<K, V> tx) throws GridCacheEntryRemovedException, GridCacheFilterFailedException, IgniteCheckedException; /**
