Merge branch 'sprint-1' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-96
Conflicts:
modules/core/src/main/java/org/apache/ignite/cache/eviction/EvictableEntry.java
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5df2b65e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5df2b65e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5df2b65e
Branch: refs/heads/ignite-96
Commit: 5df2b65e50104347aaf090795cf6d29a88477741
Parents: 8090f07
Author: Yakov Zhdanov <[email protected]>
Authored: Fri Feb 6 17:47:18 2015 +0300
Committer: Yakov Zhdanov <[email protected]>
Committed: Fri Feb 6 17:47:18 2015 +0300
----------------------------------------------------------------------
.../processors/cache/CacheEntryImpl.java | 19 ++++++
.../processors/cache/GridCacheAdapter.java | 32 +++++++--
.../cache/GridCacheEvictionManager.java | 2 +-
.../processors/cache/GridCacheIterator.java | 14 ++--
.../processors/cache/GridCacheKeySet.java | 14 ++--
.../processors/cache/GridCacheMapAdapter.java | 5 +-
.../processors/cache/GridCacheMapEntry.java | 6 +-
.../cache/GridCacheValueCollection.java | 13 ++--
.../distributed/dht/GridDhtCacheAdapter.java | 6 +-
.../distributed/near/GridNearCacheAdapter.java | 11 +---
.../query/GridCacheDistributedQueryManager.java | 1 +
.../GridCacheContinuousQueryHandler.java | 4 +-
.../ignite/internal/util/lang/GridFunc.java | 69 ++------------------
.../cache/GridCacheAbstractSelfTest.java | 7 +-
14 files changed, 98 insertions(+), 105 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl.java
index d6feefc..e5a084e 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl.java
@@ -17,6 +17,8 @@
package org.apache.ignite.internal.processors.cache;
+import org.jetbrains.annotations.*;
+
import javax.cache.*;
/**
@@ -29,6 +31,9 @@ public class CacheEntryImpl<K, V> implements Cache.Entry<K,
V> {
/** */
private final V val;
+ /** Version. */
+ private Object ver;
+
/**
* @param key Key.
* @param val Value.
@@ -48,6 +53,20 @@ public class CacheEntryImpl<K, V> implements Cache.Entry<K,
V> {
return val;
}
+ /**
+ * @return Version.
+ */
+ @Nullable public Object version() {
+ return ver;
+ }
+
+ /**
+ * @param ver Version.
+ */
+ public void version(Object ver) {
+ this.ver = ver;
+ }
+
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public <T> T unwrap(Class<T> cls) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/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 378bd41..668091f 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
@@ -1304,7 +1304,8 @@ public abstract class GridCacheAdapter<K, V> implements
GridCache<K, V>,
/** {@inheritDoc} */
@Override public Set<Entry<K, V>>
primaryEntrySetx(IgnitePredicate<Entry<K, V>>... filter) {
- return map.entriesx(F.and(filter, F.<K, V>cachePrimary()));
+ //return map.entriesx(F.and(filter, F.<K, V>cachePrimary()));
+ return null; // TODO ignite-96
}
/** {@inheritDoc} */
@@ -3715,9 +3716,24 @@ public abstract class GridCacheAdapter<K, V> implements
GridCache<K, V>,
if (keyCheck)
validateCacheKey(key);
- GridCacheEntryEx<K, V> entry = peekEx(key);
+ try {
+ GridCacheEntryEx<K, V> e = entry0(key,
ctx.discovery().topologyVersion(), false, false);
+
+ if (e == null)
+ return false;
+
+ // Delegate to near if dht.
+ if (e.isDht() && CU.isNearEnabled(ctx)) {
+ GridCache<K, V> near = ctx.isDht() ? ctx.dht().near() :
ctx.near();
+
+ return near.isLockedByThread(key) || e.lockedByThread();
+ }
- return entry != null && entry.wrap(false).isLockedByThread();
+ return e.lockedByThread();
+ }
+ catch (GridCacheEntryRemovedException ignore) {
+ return false;
+ }
}
/** {@inheritDoc} */
@@ -4923,7 +4939,8 @@ public abstract class GridCacheAdapter<K, V> implements
GridCache<K, V>,
*/
public Set<Entry<K, V>> primaryEntrySet(
@Nullable IgnitePredicate<Entry<K, V>>... filter) {
- return map.entries(F.and(filter, F.<K, V>cachePrimary()));
+// return map.entries(F.and(filter, F.<K, V>cachePrimary()));
+ return null; // TODO ignite-96
}
/**
@@ -4939,7 +4956,9 @@ public abstract class GridCacheAdapter<K, V> implements
GridCache<K, V>,
* @return Primary key set.
*/
public Set<K> primaryKeySet(@Nullable IgnitePredicate<Entry<K, V>>...
filter) {
- return map.keySet(F.and(filter, F.<K, V>cachePrimary()));
+// return map.keySet(F.and(filter, F.<K, V>cachePrimary()));
+ return null;
+ // TODO ignite-96
}
/**
@@ -4947,7 +4966,8 @@ public abstract class GridCacheAdapter<K, V> implements
GridCache<K, V>,
* @return Primary values.
*/
public Collection<V> primaryValues(@Nullable IgnitePredicate<Entry<K,
V>>... filter) {
- return map.values(F.and(filter, F.<K, V>cachePrimary()));
+// return map.values(F.and(filter, F.<K, V>cachePrimary()));
+ return null;
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index 0b52d60..88d6e40 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@ -1237,7 +1237,7 @@ public class GridCacheEvictionManager<K, V> extends
GridCacheManagerAdapter<K, V
// then we should not evict entry.
return cctx.vararg(new P1<Entry<K, V>>() {
@Override public boolean apply(Entry<K, V> e) {
- GridCacheVersion ver = (GridCacheVersion)e.version();
+ GridCacheVersion ver =
(GridCacheVersion)((CacheEntryImpl)e).version();
return info.version().equals(ver) && F.isAll(info.filter());
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIterator.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIterator.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIterator.java
index 4d177fc..fc936e6 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIterator.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIterator.java
@@ -75,12 +75,14 @@ public class GridCacheIterator<K, V, T> implements
GridSerializableIterator<T> {
@Override public void remove() {
it.remove();
- try {
+// try {
// Back remove operation by actual cache.
- cur.removex();
- }
- catch (IgniteCheckedException e) {
- throw new GridClosureException(e);
- }
+ // cur.removex();
+ // TODO ignite-96
+
+// }
+// catch (IgniteCheckedException e) {
+// throw new GridClosureException(e);
+// }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheKeySet.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheKeySet.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheKeySet.java
index fc7f979..68ca70f 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheKeySet.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheKeySet.java
@@ -85,12 +85,14 @@ public class GridCacheKeySet<K, V> extends
GridSerializableSet<K> {
map.remove(o);
- try {
- e.removex();
- }
- catch (IgniteCheckedException ex) {
- throw new IgniteException(ex);
- }
+ // // TODO ignite-96
+
+// try {
+// e.removex();
+// }
+// catch (IgniteCheckedException ex) {
+// throw new IgniteException(ex);
+// }
return true;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapAdapter.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapAdapter.java
index c1585d3..ab4be27 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapAdapter.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapAdapter.java
@@ -167,7 +167,8 @@ public class GridCacheMapAdapter<K, V> implements
ConcurrentMap<K, V> {
/** {@inheritDoc} */
@SuppressWarnings({"unchecked", "RedundantCast"})
- @Override public Set<Entry<K, V>> entrySet() {
- return (Set<Entry<K, V>>)(Set<? extends Entry<K, V>>)prj.entrySet();
+ @Override public Set<Map.Entry<K, V>> entrySet() {
+// return (Set<Map.Entry<K, V>>)(Set<? extends Map.Entry<K,
V>>)prj.entrySet();
+ return null; // TODO ignite-96
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 7d033ce..d83025d 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -3695,7 +3695,11 @@ public abstract class GridCacheMapEntry<K, V> implements
GridCacheEntryEx<K, V>
@Override public Entry<K, V> wrap(boolean prjAware) {
try {
- return new CacheEntryImpl<>(key, rawGetOrUnmarshal(true));
+ CacheEntryImpl<K, V> entry = new CacheEntryImpl<>(key,
rawGetOrUnmarshal(true));
+
+ entry.version(ver);
+
+ return entry;
}
catch (IgniteCheckedException e) {
throw new RuntimeException("Fixme"); //TODO ignite-96
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
index 66dd627..f3d7702 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
@@ -135,12 +135,13 @@ public class GridCacheValueCollection<K, V> extends
GridSerializableCollection<V
if (F.isAll(e, filter) && F.eq(o, e.getValue())) {
it.remove();
- try {
- e.removex();
- }
- catch (IgniteCheckedException ex) {
- throw new IgniteException(ex);
- }
+ // TODO ignite-96
+// try {
+// e.removex();
+// }
+// catch (IgniteCheckedException ex) {
+// throw new IgniteException(ex);
+// }
rmv = true;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index 3c1a761..b43cbb0 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -868,7 +868,8 @@ public abstract class GridDhtCacheAdapter<K, V> extends
GridDistributedCacheAdap
Entry<K, V> entry = (Entry<K, V>)o;
- return partId == entry.partition() && F.eq(entry.peek(),
peek(entry.getKey()));
+ return partId == ctx.affinity().partition(entry.getKey()) &&
+ F.eq(entry.getValue(), peek(entry.getKey()));
}
/** {@inheritDoc} */
@@ -958,7 +959,8 @@ public abstract class GridDhtCacheAdapter<K, V> extends
GridDistributedCacheAdap
if (last == null)
throw new IllegalStateException();
- ctx.cache().remove(last.getKey(), last.getValue());
+ // TODO ignite-96
+ // ctx.cache().remove(last.getKey(), last.getValue());
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 542db33..f8c5c24 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -434,7 +434,9 @@ public abstract class GridNearCacheAdapter<K, V> extends
GridDistributedCacheAda
/** {@inheritDoc} */
@Override public Collection<V> primaryValues(@Nullable
IgnitePredicate<Entry<K, V>>... filter) {
- return new GridCacheValueCollection<>(ctx, entrySet(filter),
ctx.vararg(F.<K, V>cachePrimary()));
+ return null;
+ // return new GridCacheValueCollection<>(ctx, entrySet(filter),
ctx.vararg(F.<K, V>cachePrimary()));
+ // TODO ignite-96
}
/** {@inheritDoc} */
@@ -471,13 +473,6 @@ public abstract class GridNearCacheAdapter<K, V> extends
GridDistributedCacheAda
return super.compact(key, filter) | dht().compact(key, filter);
}
- /** {@inheritDoc} */
- @Override public Entry<K, V> entry(K key) {
- // We don't try wrap entry from near or dht cache.
- // Created object will be wrapped once some method is called.
- return new GridPartitionedCacheEntryImpl<>(ctx.projectionPerCall(),
ctx, key, null);
- }
-
/**
* Peeks only near cache without looking into DHT cache.
*
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
index d65f774..f0219d7 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
@@ -32,6 +32,7 @@ import org.apache.ignite.lang.*;
import org.jdk8.backport.*;
import org.jetbrains.annotations.*;
+import javax.cache.Cache.*;
import java.util.*;
import java.util.concurrent.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
index e0e7bee..797bff8 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
@@ -192,7 +192,9 @@ class GridCacheContinuousQueryHandler<K, V> implements
GridContinuousHandler {
@Override public void
onEntryUpdate(GridCacheContinuousQueryEntry<K, V> e, boolean recordEvt) {
GridCacheContext<K, V> cctx = cacheContext(ctx);
- if (cctx.isReplicated() && !skipPrimaryCheck && !e.primary())
+ if (cctx.isReplicated() &&
+ !skipPrimaryCheck &&
+ !cctx.affinity().primary(cctx.localNode(), e.getKey(),
cctx.topology().topologyVersion()))
return;
boolean notify;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
index 5bee688..609ac70 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
@@ -394,12 +394,7 @@ public class GridFunc {
private static final IgnitePredicate CACHE_ENTRY_NO_GET_VAL = new
IgnitePredicate() {
@SuppressWarnings({"unchecked"})
@Override public boolean apply(Object o) {
- try {
- return ((Entry)o).get() == null;
- }
- catch (IgniteCheckedException e) {
- throw new GridClosureException(e);
- }
+ return ((Entry)o).getValue() == null;
}
@Override public String toString() {
@@ -411,7 +406,7 @@ public class GridFunc {
private static final IgnitePredicate CACHE_ENTRY_HAS_PEEK_VAL = new
IgnitePredicate() {
@SuppressWarnings({"unchecked"})
@Override public boolean apply(Object o) {
- return ((Entry)o).peek() != null;
+ return ((Entry)o).getValue() != null;
}
@Override public String toString() {
@@ -423,7 +418,7 @@ public class GridFunc {
private static final IgnitePredicate CACHE_ENTRY_NO_PEEK_VAL = new
IgnitePredicate() {
@SuppressWarnings({"unchecked"})
@Override public boolean apply(Object o) {
- return ((Entry)o).peek() == null;
+ return ((Entry)o).getValue() == null;
}
@Override public String toString() {
@@ -432,30 +427,6 @@ public class GridFunc {
};
/** */
- private static final IgnitePredicate CACHE_ENTRY_PRIMARY = new
IgnitePredicate() {
- @SuppressWarnings({"unchecked"})
- @Override public boolean apply(Object o) {
- return ((Entry)o).primary();
- }
-
- @Override public String toString() {
- return "Cache primary entry predicate.";
- }
- };
-
- /** */
- private static final IgnitePredicate CACHE_ENTRY_BACKUP = new
IgnitePredicate() {
- @SuppressWarnings({"unchecked"})
- @Override public boolean apply(Object o) {
- return ((Entry)o).backup();
- }
-
- @Override public String toString() {
- return "Cache backup entry predicate.";
- }
- };
-
- /** */
private static final IgniteClosure<ClusterNode, UUID> NODE2ID = new
IgniteClosure<ClusterNode, UUID>() {
@Override public UUID apply(ClusterNode n) {
return n.id();
@@ -7210,7 +7181,7 @@ public class GridFunc {
* @return Predicate that accepts {@link Entry} value and compares its
value
* to the given value.
*/
- public static <K, V> IgnitePredicate<Entry<K, V>> mapValue(@Nullable final
V val) {
+ public static <K, V> IgnitePredicate<Map.Entry<K, V>> mapValue(@Nullable
final V val) {
return new P1<Map.Entry<K, V>>() {
@Override public boolean apply(Map.Entry<K, V> e) {
return e.getValue().equals(val);
@@ -7228,7 +7199,7 @@ public class GridFunc {
* @return Predicate that accepts {@code Map.Entry} value and compares its
key
* to the given value.
*/
- public static <K, V> IgnitePredicate<Entry<K, V>> mapKey(@Nullable final K
key) {
+ public static <K, V> IgnitePredicate<Map.Entry<K, V>> mapKey(@Nullable
final K key) {
return new P1<Map.Entry<K, V>>() {
@Override public boolean apply(Map.Entry<K, V> e) {
return e.getKey().equals(key);
@@ -7836,34 +7807,6 @@ public class GridFunc {
}
/**
- * Gets predicate which returns {@code true} if {@link
org.apache.ignite.cache.Entry#primary()}
- * method returns {@code true}.
- *
- * @param <K> Cache key type.
- * @param <V> Cache value type.
- * @return Predicate which returns {@code true} if {@link
org.apache.ignite.cache.Entry#primary()}
- * method returns {@code true}.
- */
- @SuppressWarnings({"unchecked"})
- public static <K, V> IgnitePredicate<Entry<K, V>> cachePrimary() {
- return (IgnitePredicate<Entry<K, V>>)CACHE_ENTRY_PRIMARY;
- }
-
- /**
- * Gets predicate which returns {@code true} if {@link
org.apache.ignite.cache.Entry#primary()}
- * method returns {@code false}.
- *
- * @param <K> Cache key type.
- * @param <V> Cache value type.
- * @return Predicate which returns {@code true} if {@link
org.apache.ignite.cache.Entry#primary()}
- * method returns {@code false}.
- */
- @SuppressWarnings({"unchecked"})
- public static <K, V> IgnitePredicate<Entry<K, V>> cacheBackup() {
- return (IgnitePredicate<Entry<K, V>>)CACHE_ENTRY_BACKUP;
- }
-
- /**
* Gets predicate which returns true if {@link
org.apache.ignite.cache.Entry#get()}
* method returns value that is contained in given collection. Note that
if collection
* of provided values is empty this method returns predicate that
evaluates to {@code false}
@@ -7925,7 +7868,7 @@ public class GridFunc {
return isEmpty(vals) ? F.<Entry<K, V>>alwaysFalse() :
new IgnitePredicate<Entry<K, V>>() {
@Override public boolean apply(Entry<K, V> e) {
- V v = e.peek();
+ V v = e.getValue();
assert vals != null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df2b65e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index 9283222..06b19e6 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -37,6 +37,7 @@ import org.apache.ignite.transactions.*;
import org.jdk8.backport.*;
import org.jetbrains.annotations.*;
+import javax.cache.Cache.*;
import javax.cache.configuration.*;
import java.util.*;
import java.util.concurrent.atomic.*;
@@ -513,7 +514,7 @@ public abstract class GridCacheAbstractSelfTest extends
GridCommonAbstractTest {
protected static final IgnitePredicate<Entry<String, Integer>> lt50 =
new P1<Entry<String, Integer>>() {
@Override public boolean apply(Entry<String, Integer> entry) {
- Integer i = entry.peek();
+ Integer i = entry.getValue();
return i != null && i < 50;
}
@@ -525,7 +526,7 @@ public abstract class GridCacheAbstractSelfTest extends
GridCommonAbstractTest {
protected static final IgnitePredicate<Entry<String, Integer>> gte100 =
new P1<Entry<String, Integer>>() {
@Override public boolean apply(Entry<String, Integer> entry) {
- Integer i = entry.peek();
+ Integer i = entry.getValue();
return i != null && i >= 100;
}
@@ -541,7 +542,7 @@ public abstract class GridCacheAbstractSelfTest extends
GridCommonAbstractTest {
protected static final IgnitePredicate<Entry<String, Integer>> gte200 =
new P1<Entry<String, Integer>>() {
@Override public boolean apply(Entry<String, Integer> entry) {
- Integer i = entry.peek();
+ Integer i = entry.getValue();
return i != null && i >= 200;
}