You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/04/09 15:52:56 UTC
[1/6] incubator-ignite git commit: #ignite-707: remove methods from
GridCacheProjectionEx.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-683-1 923961dc1 -> d6ae9036d
#ignite-707: remove methods from GridCacheProjectionEx.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fb4985ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fb4985ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fb4985ed
Branch: refs/heads/ignite-683-1
Commit: fb4985ed52d389a0a73a84a50e5a77c06f085371
Parents: 923961d
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 9 15:56:40 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 9 15:56:40 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 109 +++++++++++++----
.../processors/cache/GridCacheProjectionEx.java | 112 -----------------
.../cache/GridCacheProjectionImpl.java | 66 +---------
.../processors/cache/GridCacheProxyImpl.java | 120 -------------------
4 files changed, 88 insertions(+), 319 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4985ed/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 6003f57..461b3ff 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
@@ -1302,15 +1302,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public V get(K key, @Nullable GridCacheEntryEx entry, boolean deserializePortable,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- String taskName = ctx.kernalContext().job().currentTaskName();
-
- return getAllAsync(F.asList(key), !ctx.config().isReadFromBackup(), /*skip tx*/false, entry, null, taskName,
- deserializePortable, false).get().get(key);
- }
-
- /** {@inheritDoc} */
@Override public V getForcePrimary(K key) throws IgniteCheckedException {
String taskName = ctx.kernalContext().job().currentTaskName();
@@ -2020,8 +2011,18 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return put(key, val, null, -1, filter);
}
- /** {@inheritDoc} */
- @Nullable @Override public V put(final K key,
+ /**
+ * Internal method that is called from {@link CacheEntryImpl}.
+ *
+ * @param key Key.
+ * @param val Value.
+ * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
+ * @param ttl Optional time-to-live. If negative, leaves ttl value unchanged.
+ * @param filter Optional filter.
+ * @return Previous value.
+ * @throws IgniteCheckedException If failed.
+ */
+ @Nullable public V put(final K key,
final V val,
@Nullable final GridCacheEntryEx cached,
final long ttl,
@@ -2055,8 +2056,18 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return prevVal;
}
- /** {@inheritDoc} */
- @Override public boolean putx(final K key, final V val, @Nullable final GridCacheEntryEx cached,
+ /**
+ * Internal method that is called from {@link CacheEntryImpl}.
+ *
+ * @param key Key.
+ * @param val Value.
+ * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
+ * @param ttl Optional time-to-live. If negative, leaves ttl value unchanged.
+ * @param filter Optional filter.
+ * @return Previous value.
+ * @throws IgniteCheckedException If failed.
+ */
+ public boolean putx(final K key, final V val, @Nullable final GridCacheEntryEx cached,
final long ttl, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
A.notNull(key, "key", val, "val");
@@ -2091,8 +2102,17 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return fut;
}
- /** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> putAsync(final K key, final V val, @Nullable final GridCacheEntryEx entry,
+ /**
+ * Internal method that is called from {@link CacheEntryImpl}.
+ *
+ * @param key Key.
+ * @param val Value.
+ * @param entry Optional cached entry.
+ * @param ttl Optional time-to-live value. If negative, leaves ttl value unchanged.
+ * @param filter Optional filter.
+ * @return Put operation future.
+ */
+ public IgniteInternalFuture<V> putAsync(final K key, final V val, @Nullable final GridCacheEntryEx entry,
final long ttl, @Nullable final CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
@@ -2395,8 +2415,17 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return fut;
}
- /** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> putxAsync(final K key, final V val,
+ /**
+ * Internal method that is called from {@link CacheEntryImpl}.
+ *
+ * @param key Key.
+ * @param val Value.
+ * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
+ * @param ttl Optional time-to-live. If negative, leave ttl value unchanged.
+ * @param filter Optional filter.
+ * @return Putx operation future.
+ */
+ public IgniteInternalFuture<Boolean> putxAsync(final K key, final V val,
@Nullable final GridCacheEntryEx entry, final long ttl,
@Nullable final CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
@@ -2758,8 +2787,16 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return remove(key, null, filter);
}
- /** {@inheritDoc} */
- @Override public V remove(final K key, @Nullable final GridCacheEntryEx entry,
+ /**
+ * Internal method that is called from {@link CacheEntryImpl}.
+ *
+ * @param key Key to remove.
+ * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
+ * @param filter Optional filter.
+ * @return Previous value.
+ * @throws IgniteCheckedException If failed.
+ */
+ public V remove(final K key, @Nullable final GridCacheEntryEx entry,
@Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2805,8 +2842,15 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return fut;
}
- /** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> removeAsync(final K key, @Nullable final GridCacheEntryEx entry,
+ /**
+ * Internal method that is called from {@link CacheEntryImpl}.
+ *
+ * @param key Key to remove.
+ * @param entry Optional cached entry.
+ * @param filter Optional filter.
+ * @return Put operation future.
+ */
+ public IgniteInternalFuture<V> removeAsync(final K key, @Nullable final GridCacheEntryEx entry,
@Nullable final CacheEntryPredicate... filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2908,8 +2952,16 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return rmv;
}
- /** {@inheritDoc} */
- @Override public boolean removex(final K key, @Nullable final GridCacheEntryEx entry,
+ /**
+ * Internal method that is called from {@link CacheEntryImpl}.
+ *
+ * @param key Key to remove.
+ * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
+ * @param filter Optional filter.
+ * @return Previous value.
+ * @throws IgniteCheckedException If failed.
+ */
+ public boolean removex(final K key, @Nullable final GridCacheEntryEx entry,
@Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2943,8 +2995,15 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return removexAsync(key, null, filter);
}
- /** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> removexAsync(final K key, @Nullable final GridCacheEntryEx entry,
+ /**
+ * Internal method that is called from {@link CacheEntryImpl}.
+ *
+ * @param key Key to remove.
+ * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
+ * @param filter Optional filter.
+ * @return Putx operation future.
+ */
+ public IgniteInternalFuture<Boolean> removexAsync(final K key, @Nullable final GridCacheEntryEx entry,
@Nullable final CacheEntryPredicate... filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4985ed/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionEx.java
index ec67976..f00d9d6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionEx.java
@@ -41,61 +41,6 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K, V> {
* @return Internal projection.
*/
GridCacheProjectionEx<K, V> forSubjectId(UUID subjId);
-
- /**
- * Internal method that is called from {@link CacheEntryImpl}.
- *
- * @param key Key.
- * @param val Value.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
- * @param ttl Optional time-to-live. If negative, leaves ttl value unchanged.
- * @param filter Optional filter.
- * @return Previous value.
- * @throws IgniteCheckedException If failed.
- */
- @Nullable public V put(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
-
- /**
- * Internal method that is called from {@link CacheEntryImpl}.
- *
- * @param key Key.
- * @param val Value.
- * @param entry Optional cached entry.
- * @param ttl Optional time-to-live value. If negative, leaves ttl value unchanged.
- * @param filter Optional filter.
- * @return Put operation future.
- */
- public IgniteInternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate... filter);
-
- /**
- * Internal method that is called from {@link CacheEntryImpl}.
- *
- * @param key Key.
- * @param val Value.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
- * @param ttl Optional time-to-live. If negative, leaves ttl value unchanged.
- * @param filter Optional filter.
- * @return Previous value.
- * @throws IgniteCheckedException If failed.
- */
- public boolean putx(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
-
- /**
- * Internal method that is called from {@link CacheEntryImpl}.
- *
- * @param key Key.
- * @param val Value.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
- * @param ttl Optional time-to-live. If negative, leave ttl value unchanged.
- * @param filter Optional filter.
- * @return Putx operation future.
- */
- public IgniteInternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate... filter);
-
/**
* Store DR data.
*
@@ -115,29 +60,6 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K, V> {
throws IgniteCheckedException;
/**
- * Internal method that is called from {@link CacheEntryImpl}.
- *
- * @param key Key to remove.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
- * @param filter Optional filter.
- * @return Previous value.
- * @throws IgniteCheckedException If failed.
- */
- @Nullable public V remove(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
-
- /**
- * Internal method that is called from {@link CacheEntryImpl}.
- *
- * @param key Key to remove.
- * @param entry Optional cached entry.
- * @param filter Optional filter.
- * @return Put operation future.
- */
- public IgniteInternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter);
-
- /**
* Removes DR data.
*
* @param drMap DR map.
@@ -155,29 +77,6 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K, V> {
public IgniteInternalFuture<?> removeAllConflictAsync(Map<KeyCacheObject, GridCacheVersion> drMap) throws IgniteCheckedException;
/**
- * Internal method that is called from {@link CacheEntryImpl}.
- *
- * @param key Key to remove.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
- * @param filter Optional filter.
- * @return Previous value.
- * @throws IgniteCheckedException If failed.
- */
- public boolean removex(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
-
- /**
- * Internal method that is called from {@link CacheEntryImpl}.
- *
- * @param key Key to remove.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
- * @param filter Optional filter.
- * @return Putx operation future.
- */
- public IgniteInternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter);
-
- /**
* Asynchronously stores given key-value pair in cache only if only if the previous value is equal to the
* {@code 'oldVal'} passed in.
* <p>
@@ -257,17 +156,6 @@ public interface GridCacheProjectionEx<K, V> extends CacheProjection<K, V> {
public IgniteInternalFuture<GridCacheReturn> removexAsync(K key, V val);
/**
- * @param key Key to retrieve the value for.
- * @param entry Cached entry when called from entry wrapper.
- * @param filter Filter to check prior to getting the value. Note that filter check
- * together with getting the value is an atomic operation.
- * @return Value.
- * @throws IgniteCheckedException If failed.
- */
- @Nullable public V get(K key, @Nullable GridCacheEntryEx entry, boolean deserializePortable,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
-
- /**
* Gets value from cache. Will go to primary node even if this is a backup.
*
* @param key Key to get value for.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4985ed/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index e94e188..b8dd5f1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -283,12 +283,6 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public V get(K key, @Nullable GridCacheEntryEx entry, boolean deserializePortable,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return cache.get(key, entry, deserializePortable, filter);
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<V> getAsync(K key) {
return cache.getAsync(key, deserializePortables());
}
@@ -355,29 +349,9 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public V put(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return cache.put(key, val, entry, ttl, filter);
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<V> putAsync(K key, V val,
@Nullable CacheEntryPredicate[] filter) {
- return putAsync(key, val, null, -1, filter);
- }
-
- /** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate[] filter) {
- A.notNull(key, "key", val, "val");
-
- return cache.putAsync(key, val, entry, ttl, filter);
- }
-
- /** {@inheritDoc} */
- @Override public boolean putx(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return cache.putx(key, val, entry, ttl, filter);
+ return cache.putAsync(key, val, null, -1, filter);
}
/** {@inheritDoc} */
@@ -441,15 +415,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val,
@Nullable CacheEntryPredicate[] filter) {
- return putxAsync(key, val, null, -1, filter);
- }
-
- /** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx entry,
- long ttl, @Nullable CacheEntryPredicate[] filter) {
- A.notNull(key, "key", val, "val");
-
- return cache.putxAsync(key, val, entry, ttl, filter);
+ return cache.putxAsync(key, val, null, -1, filter);
}
/** {@inheritDoc} */
@@ -673,20 +639,8 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public V remove(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return removeAsync(key, entry, filter).get();
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate[] filter) {
- return removeAsync(key, null, filter);
- }
-
- /** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
- return cache.removeAsync(key, entry, filter);
+ return cache.removeAsync(key, null, filter);
}
/** {@inheritDoc} */
@@ -707,21 +661,9 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public boolean removex(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return removexAsync(key, entry, filter).get();
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> removexAsync(K key,
@Nullable CacheEntryPredicate[] filter) {
- return removexAsync(key, null, filter);
- }
-
- /** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
- return cache.removexAsync(key, entry, filter);
+ return cache.removexAsync(key, null, filter);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4985ed/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index 9674cca..d79615e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -421,19 +421,6 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public V get(K key, @Nullable GridCacheEntryEx entry, boolean deserializePortable,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
- try {
- return delegate.get(key, entry, deserializePortable, filter);
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<V> getAsync(K key) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -591,19 +578,6 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public V put(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
- try {
- return delegate.put(key, val, entry, ttl, filter);
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<V> putAsync(K key, V val,
@Nullable CacheEntryPredicate[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -617,32 +591,6 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate... filter) {
- GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
- try {
- return delegate.putAsync(key, val, entry, ttl, filter);
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
- @Override public boolean putx(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
- try {
- return delegate.putx(key, val, entry, ttl, filter);
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
@Override public boolean putx(K key, V val, @Nullable CacheEntryPredicate[] filter)
throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -779,22 +727,6 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> putxAsync(K key,
- V val,
- @Nullable GridCacheEntryEx entry,
- long ttl,
- @Nullable CacheEntryPredicate... filter) {
- GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
- try {
- return delegate.putxAsync(key, val, entry, ttl, filter);
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
@Nullable @Override public V putIfAbsent(K key, V val) throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1332,19 +1264,6 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public V remove(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
- try {
- return delegate.remove(key, entry, filter);
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1357,19 +1276,6 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
- GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
- try {
- return delegate.removeAsync(key, entry, filter);
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
@Override public boolean removex(K key, @Nullable CacheEntryPredicate[] filter)
throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1410,19 +1316,6 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public boolean removex(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
- try {
- return delegate.removex(key, entry, filter);
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> removexAsync(K key,
@Nullable CacheEntryPredicate[] filter) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1436,19 +1329,6 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
- GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
- try {
- return delegate.removexAsync(key, entry, filter);
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
@Override public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
[2/6] incubator-ignite git commit: #ignite-707: rename methods.
Posted by sb...@apache.org.
#ignite-707: rename methods.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/260a494d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/260a494d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/260a494d
Branch: refs/heads/ignite-683-1
Commit: 260a494d0ddcc157f0a4323c08beb06249ce5ec1
Parents: fb4985e
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 9 16:06:46 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 9 16:06:46 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 59 ++++++++--------
.../cache/GridCacheProjectionImpl.java | 9 ++-
.../dht/atomic/GridDhtAtomicCache.java | 40 +++++------
.../distributed/near/GridNearAtomicCache.java | 72 ++++++++++----------
.../local/atomic/GridLocalAtomicCache.java | 64 ++++++++---------
5 files changed, 121 insertions(+), 123 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/260a494d/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 461b3ff..21699cc 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
@@ -461,7 +461,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @param isolation Transaction isolation.
* @param invalidate Invalidate flag.
* @param accessTtl TTL for read operation.
- * @param filter Optional filter.
* @return Locks future.
*/
public abstract IgniteInternalFuture<Boolean> txLockAsync(
@@ -2008,7 +2007,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
/** {@inheritDoc} */
@Override public V put(K key, V val, @Nullable CacheEntryPredicate... filter)
throws IgniteCheckedException {
- return put(key, val, null, -1, filter);
+ return put0(key, val, null, -1, filter);
}
/**
@@ -2016,17 +2015,17 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
*
* @param key Key.
* @param val Value.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
+ * @param cached Cached entry. If not provided, equivalent to {CacheProjection#put}.
* @param ttl Optional time-to-live. If negative, leaves ttl value unchanged.
* @param filter Optional filter.
* @return Previous value.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public V put(final K key,
- final V val,
- @Nullable final GridCacheEntryEx cached,
- final long ttl,
- @Nullable final CacheEntryPredicate[] filter)
+ @Nullable public V put0(final K key,
+ final V val,
+ @Nullable final GridCacheEntryEx cached,
+ final long ttl,
+ @Nullable final CacheEntryPredicate[] filter)
throws IgniteCheckedException
{
boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2061,14 +2060,14 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
*
* @param key Key.
* @param val Value.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
+ * @param cached Cached entry. If not provided, equivalent to {CacheProjection#put}.
* @param ttl Optional time-to-live. If negative, leaves ttl value unchanged.
* @param filter Optional filter.
* @return Previous value.
* @throws IgniteCheckedException If failed.
*/
- public boolean putx(final K key, final V val, @Nullable final GridCacheEntryEx cached,
- final long ttl, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
+ public boolean putx0(final K key, final V val, @Nullable final GridCacheEntryEx cached,
+ final long ttl, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2094,7 +2093,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
final long start = statsEnabled ? System.nanoTime() : 0L;
- IgniteInternalFuture<V> fut = putAsync(key, val, null, -1, filter);
+ IgniteInternalFuture<V> fut = putAsync0(key, val, null, -1, filter);
if (statsEnabled)
fut.listen(new UpdatePutAndGetTimeStatClosure<V>(metrics0(), start));
@@ -2112,8 +2111,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @param filter Optional filter.
* @return Put operation future.
*/
- public IgniteInternalFuture<V> putAsync(final K key, final V val, @Nullable final GridCacheEntryEx entry,
- final long ttl, @Nullable final CacheEntryPredicate... filter) {
+ public IgniteInternalFuture<V> putAsync0(final K key, final V val, @Nullable final GridCacheEntryEx entry,
+ final long ttl, @Nullable final CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2407,7 +2406,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
final long start = statsEnabled ? System.nanoTime() : 0L;
- IgniteInternalFuture<Boolean> fut = putxAsync(key, val, null, -1, filter);
+ IgniteInternalFuture<Boolean> fut = putxAsync0(key, val, null, -1, filter);
if (statsEnabled)
fut.listen(new UpdatePutTimeStatClosure<Boolean>(metrics0(), start));
@@ -2425,9 +2424,9 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @param filter Optional filter.
* @return Putx operation future.
*/
- public IgniteInternalFuture<Boolean> putxAsync(final K key, final V val,
- @Nullable final GridCacheEntryEx entry, final long ttl,
- @Nullable final CacheEntryPredicate... filter) {
+ public IgniteInternalFuture<Boolean> putxAsync0(final K key, final V val,
+ @Nullable final GridCacheEntryEx entry, final long ttl,
+ @Nullable final CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2784,7 +2783,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
/** {@inheritDoc} */
@Nullable @Override public V remove(K key, CacheEntryPredicate[] filter)
throws IgniteCheckedException {
- return remove(key, null, filter);
+ return remove0(key, null, filter);
}
/**
@@ -2796,8 +2795,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @return Previous value.
* @throws IgniteCheckedException If failed.
*/
- public V remove(final K key, @Nullable final GridCacheEntryEx entry,
- @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
+ public V remove0(final K key, @Nullable final GridCacheEntryEx entry,
+ @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
long start = statsEnabled ? System.nanoTime() : 0L;
@@ -2834,7 +2833,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
final long start = statsEnabled ? System.nanoTime() : 0L;
- IgniteInternalFuture<V> fut = removeAsync(key, null, filter);
+ IgniteInternalFuture<V> fut = removeAsync0(key, null, filter);
if (statsEnabled)
fut.listen(new UpdateRemoveTimeStatClosure<V>(metrics0(), start));
@@ -2850,8 +2849,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @param filter Optional filter.
* @return Put operation future.
*/
- public IgniteInternalFuture<V> removeAsync(final K key, @Nullable final GridCacheEntryEx entry,
- @Nullable final CacheEntryPredicate... filter) {
+ public IgniteInternalFuture<V> removeAsync0(final K key, @Nullable final GridCacheEntryEx entry,
+ @Nullable final CacheEntryPredicate... filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
final long start = statsEnabled ? System.nanoTime() : 0L;
@@ -2944,7 +2943,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
long start = statsEnabled ? System.nanoTime() : 0L;
- boolean rmv = removex(key, null, filter);
+ boolean rmv = removex0(key, null, filter);
if (statsEnabled && rmv)
metrics0().addRemoveTimeNanos(System.nanoTime() - start);
@@ -2961,8 +2960,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @return Previous value.
* @throws IgniteCheckedException If failed.
*/
- public boolean removex(final K key, @Nullable final GridCacheEntryEx entry,
- @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
+ public boolean removex0(final K key, @Nullable final GridCacheEntryEx entry,
+ @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
long start = statsEnabled ? System.nanoTime() : 0L;
@@ -2992,7 +2991,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
@Override public IgniteInternalFuture<Boolean> removexAsync(K key, CacheEntryPredicate... filter) {
A.notNull(key, "key");
- return removexAsync(key, null, filter);
+ return removexAsync0(key, null, filter);
}
/**
@@ -3003,8 +3002,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @param filter Optional filter.
* @return Putx operation future.
*/
- public IgniteInternalFuture<Boolean> removexAsync(final K key, @Nullable final GridCacheEntryEx entry,
- @Nullable final CacheEntryPredicate... filter) {
+ public IgniteInternalFuture<Boolean> removexAsync0(final K key, @Nullable final GridCacheEntryEx entry,
+ @Nullable final CacheEntryPredicate... filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
final long start = statsEnabled ? System.nanoTime() : 0L;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/260a494d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index b8dd5f1..d425266 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -26,7 +26,6 @@ import org.apache.ignite.internal.processors.cache.query.*;
import org.apache.ignite.internal.processors.cache.transactions.*;
import org.apache.ignite.internal.processors.cache.version.*;
import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.transactions.*;
@@ -351,7 +350,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<V> putAsync(K key, V val,
@Nullable CacheEntryPredicate[] filter) {
- return cache.putAsync(key, val, null, -1, filter);
+ return cache.putAsync0(key, val, null, -1, filter);
}
/** {@inheritDoc} */
@@ -415,7 +414,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val,
@Nullable CacheEntryPredicate[] filter) {
- return cache.putxAsync(key, val, null, -1, filter);
+ return cache.putxAsync0(key, val, null, -1, filter);
}
/** {@inheritDoc} */
@@ -640,7 +639,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate[] filter) {
- return cache.removeAsync(key, null, filter);
+ return cache.removeAsync0(key, null, filter);
}
/** {@inheritDoc} */
@@ -663,7 +662,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> removexAsync(K key,
@Nullable CacheEntryPredicate[] filter) {
- return cache.removexAsync(key, null, filter);
+ return cache.removexAsync0(key, null, filter);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/260a494d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index f23b0ae..e5ec89a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -301,15 +301,15 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public V put(K key, V val, @Nullable GridCacheEntryEx cached, long ttl,
- @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
- return putAsync(key, val, cached, ttl, filter).get();
+ @Override public V put0(K key, V val, @Nullable GridCacheEntryEx cached, long ttl,
+ @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
+ return putAsync0(key, val, cached, ttl, filter).get();
}
/** {@inheritDoc} */
- @Override public boolean putx(K key, V val, @Nullable GridCacheEntryEx cached,
- long ttl, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return putxAsync(key, val, cached, ttl, filter).get();
+ @Override public boolean putx0(K key, V val, @Nullable GridCacheEntryEx cached,
+ long ttl, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return putxAsync0(key, val, cached, ttl, filter).get();
}
/** {@inheritDoc} */
@@ -320,8 +320,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<V> putAsync(K key, V val, @Nullable GridCacheEntryEx entry,
- long ttl, @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<V> putAsync0(K key, V val, @Nullable GridCacheEntryEx entry,
+ long ttl, @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
return updateAllAsync0(F0.asMap(key, val),
@@ -337,8 +337,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
- @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<Boolean> putxAsync0(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
+ @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
return updateAllAsync0(F0.asMap(key, val),
@@ -501,15 +501,15 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public V remove(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return removeAsync(key, entry, filter).get();
+ @Override public V remove0(K key, @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return removeAsync0(key, entry, filter).get();
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<V> removeAsync0(K key, @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
return removeAllAsync0(Collections.singletonList(key), null, true, false, filter);
@@ -530,15 +530,15 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public boolean removex(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return removexAsync(key, entry, filter).get();
+ @Override public boolean removex0(K key, @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return removexAsync0(key, entry, filter).get();
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<Boolean> removexAsync0(K key, @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
return removeAllAsync0(Collections.singletonList(key), null, false, false, filter);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/260a494d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index 264cad9..cbea18c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -388,23 +388,23 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public V put(
+ @Override public V put0(
K key,
V val,
@Nullable GridCacheEntryEx cached,
long ttl,
@Nullable CacheEntryPredicate[] filter
) throws IgniteCheckedException {
- return dht.put(key, val, cached, ttl, filter);
+ return dht.put0(key, val, cached, ttl, filter);
}
/** {@inheritDoc} */
- @Override public boolean putx(K key,
- V val,
- @Nullable GridCacheEntryEx cached,
- long ttl,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return dht.putx(key, val, cached, ttl, filter);
+ @Override public boolean putx0(K key,
+ V val,
+ @Nullable GridCacheEntryEx cached,
+ long ttl,
+ @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return dht.putx0(key, val, cached, ttl, filter);
}
/** {@inheritDoc} */
@@ -416,22 +416,22 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<V> putAsync(K key,
- V val,
- @Nullable GridCacheEntryEx entry,
- long ttl,
- @Nullable CacheEntryPredicate... filter) {
- return dht.putAsync(key, val, entry, ttl, filter);
+ @Override public IgniteInternalFuture<V> putAsync0(K key,
+ V val,
+ @Nullable GridCacheEntryEx entry,
+ long ttl,
+ @Nullable CacheEntryPredicate... filter) {
+ return dht.putAsync0(key, val, entry, ttl, filter);
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> putxAsync(K key,
- V val,
- @Nullable GridCacheEntryEx entry,
- long ttl,
- @Nullable CacheEntryPredicate... filter) {
- return dht.putxAsync(key, val, entry, ttl, filter);
+ @Override public IgniteInternalFuture<Boolean> putxAsync0(K key,
+ V val,
+ @Nullable GridCacheEntryEx entry,
+ long ttl,
+ @Nullable CacheEntryPredicate... filter) {
+ return dht.putxAsync0(key, val, entry, ttl, filter);
}
/** {@inheritDoc} */
@@ -572,18 +572,18 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public V remove(K key,
- @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return dht.remove(key, entry, filter);
+ @Override public V remove0(K key,
+ @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return dht.remove0(key, entry, filter);
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<V> removeAsync(K key,
- @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
- return dht.removeAsync(key, entry, filter);
+ @Override public IgniteInternalFuture<V> removeAsync0(K key,
+ @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) {
+ return dht.removeAsync0(key, entry, filter);
}
/** {@inheritDoc} */
@@ -599,18 +599,18 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public boolean removex(K key,
- @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return dht.removex(key, entry, filter);
+ @Override public boolean removex0(K key,
+ @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return dht.removex0(key, entry, filter);
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> removexAsync(K key,
- @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
- return dht.removexAsync(key, entry, filter);
+ @Override public IgniteInternalFuture<Boolean> removexAsync0(K key,
+ @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) {
+ return dht.removexAsync0(key, entry, filter);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/260a494d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index 6e17f38..ad78819 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -100,11 +100,11 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public V put(K key,
- V val,
- @Nullable GridCacheEntryEx cached,
- long ttl,
- @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
+ @Override public V put0(K key,
+ V val,
+ @Nullable GridCacheEntryEx cached,
+ long ttl,
+ @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
A.notNull(key, "key", val, "val");
return (V)updateAllInternal(UPDATE,
@@ -120,11 +120,11 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public boolean putx(K key,
- V val,
- @Nullable GridCacheEntryEx cached,
- long ttl,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ @Override public boolean putx0(K key,
+ V val,
+ @Nullable GridCacheEntryEx cached,
+ long ttl,
+ @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
A.notNull(key, "key", val, "val");
return (Boolean)updateAllInternal(UPDATE,
@@ -157,11 +157,11 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<V> putAsync(K key,
- V val,
- @Nullable GridCacheEntryEx entry,
- long ttl,
- @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<V> putAsync0(K key,
+ V val,
+ @Nullable GridCacheEntryEx entry,
+ long ttl,
+ @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
return updateAllAsync0(F0.asMap(key, val),
@@ -174,11 +174,11 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> putxAsync(K key,
- V val,
- @Nullable GridCacheEntryEx entry,
- long ttl,
- @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<Boolean> putxAsync0(K key,
+ V val,
+ @Nullable GridCacheEntryEx entry,
+ long ttl,
+ @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
return updateAllAsync0(F0.asMap(key, val),
@@ -323,9 +323,9 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public V remove(K key,
- @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ @Override public V remove0(K key,
+ @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
return (V)updateAllInternal(DELETE,
Collections.singleton(key),
null,
@@ -339,9 +339,9 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<V> removeAsync(K key,
- @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<V> removeAsync0(K key,
+ @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) {
return removeAllAsync0(Collections.singletonList(key), true, false, filter);
}
@@ -368,9 +368,9 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public boolean removex(K key,
- @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ @Override public boolean removex0(K key,
+ @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
long start = statsEnabled ? System.nanoTime() : 0L;
@@ -395,9 +395,9 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> removexAsync(K key,
- @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<Boolean> removexAsync0(K key,
+ @Nullable GridCacheEntryEx entry,
+ @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
return removeAllAsync0(Collections.singletonList(key), false, false, filter);
[3/6] incubator-ignite git commit: #ignite-707: rename ttl.
Posted by sb...@apache.org.
#ignite-707: rename ttl.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c7a206f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c7a206f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c7a206f7
Branch: refs/heads/ignite-683-1
Commit: c7a206f784a9da2bf229b073468117a1fbb6167c
Parents: 260a494
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 9 16:11:04 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 9 16:11:04 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 27 ++++++++------------
.../cache/GridCacheProjectionImpl.java | 4 +--
.../dht/atomic/GridDhtAtomicCache.java | 13 +++++-----
.../distributed/near/GridNearAtomicCache.java | 12 +++------
.../local/atomic/GridLocalAtomicCache.java | 4 ---
5 files changed, 22 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7a206f7/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 21699cc..ff16d13 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
@@ -2007,7 +2007,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
/** {@inheritDoc} */
@Override public V put(K key, V val, @Nullable CacheEntryPredicate... filter)
throws IgniteCheckedException {
- return put0(key, val, null, -1, filter);
+ return put0(key, val, null, filter);
}
/**
@@ -2016,7 +2016,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @param key Key.
* @param val Value.
* @param cached Cached entry. If not provided, equivalent to {CacheProjection#put}.
- * @param ttl Optional time-to-live. If negative, leaves ttl value unchanged.
* @param filter Optional filter.
* @return Previous value.
* @throws IgniteCheckedException If failed.
@@ -2024,7 +2023,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
@Nullable public V put0(final K key,
final V val,
@Nullable final GridCacheEntryEx cached,
- final long ttl,
@Nullable final CacheEntryPredicate[] filter)
throws IgniteCheckedException
{
@@ -2041,7 +2039,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
V prevVal = syncOp(new SyncOp<V>(true) {
@Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
- return (V)tx.putAllAsync(ctx, F.t(key, val), true, cached, ttl, filter).get().value();
+ return (V)tx.putAllAsync(ctx, F.t(key, val), true, cached, -1, filter).get().value();
}
@Override public String toString() {
@@ -2061,13 +2059,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @param key Key.
* @param val Value.
* @param cached Cached entry. If not provided, equivalent to {CacheProjection#put}.
- * @param ttl Optional time-to-live. If negative, leaves ttl value unchanged.
* @param filter Optional filter.
* @return Previous value.
* @throws IgniteCheckedException If failed.
*/
- public boolean putx0(final K key, final V val, @Nullable final GridCacheEntryEx cached,
- final long ttl, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
+ public boolean putx0(final K key, final V val, @Nullable final GridCacheEntryEx cached, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2077,7 +2073,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return syncOp(new SyncOp<Boolean>(true) {
@Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
- return tx.putAllAsync(ctx, F.t(key, val), false, cached, ttl, filter).get().success();
+ return tx.putAllAsync(ctx, F.t(key, val), false, cached, -1, filter).get().success();
}
@Override public String toString() {
@@ -2093,7 +2089,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
final long start = statsEnabled ? System.nanoTime() : 0L;
- IgniteInternalFuture<V> fut = putAsync0(key, val, null, -1, filter);
+ IgniteInternalFuture<V> fut = putAsync0(key, val, null, filter);
if (statsEnabled)
fut.listen(new UpdatePutAndGetTimeStatClosure<V>(metrics0(), start));
@@ -2107,12 +2103,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @param key Key.
* @param val Value.
* @param entry Optional cached entry.
- * @param ttl Optional time-to-live value. If negative, leaves ttl value unchanged.
* @param filter Optional filter.
* @return Put operation future.
*/
- public IgniteInternalFuture<V> putAsync0(final K key, final V val, @Nullable final GridCacheEntryEx entry,
- final long ttl, @Nullable final CacheEntryPredicate... filter) {
+ public IgniteInternalFuture<V> putAsync0(final K key, final V val, @Nullable final GridCacheEntryEx entry, @Nullable final CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2122,7 +2116,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return asyncOp(new AsyncOp<V>(key) {
@Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
- return tx.putAllAsync(ctx, F.t(key, val), true, entry, ttl, filter)
+ return tx.putAllAsync(ctx, F.t(key, val), true, entry, -1, filter)
.chain((IgniteClosure<IgniteInternalFuture<GridCacheReturn>, V>)RET2VAL);
}
@@ -2406,7 +2400,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
final long start = statsEnabled ? System.nanoTime() : 0L;
- IgniteInternalFuture<Boolean> fut = putxAsync0(key, val, null, -1, filter);
+ IgniteInternalFuture<Boolean> fut = putxAsync0(key, val, null, filter);
if (statsEnabled)
fut.listen(new UpdatePutTimeStatClosure<Boolean>(metrics0(), start));
@@ -2420,12 +2414,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @param key Key.
* @param val Value.
* @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
- * @param ttl Optional time-to-live. If negative, leave ttl value unchanged.
* @param filter Optional filter.
* @return Putx operation future.
*/
public IgniteInternalFuture<Boolean> putxAsync0(final K key, final V val,
- @Nullable final GridCacheEntryEx entry, final long ttl,
+ @Nullable final GridCacheEntryEx entry,
@Nullable final CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
@@ -2436,7 +2429,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return asyncOp(new AsyncOp<Boolean>(key) {
@Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
- return tx.putAllAsync(ctx, F.t(key, val), false, entry, ttl, filter).chain(
+ return tx.putAllAsync(ctx, F.t(key, val), false, entry, -1, filter).chain(
(IgniteClosure<IgniteInternalFuture<GridCacheReturn>, Boolean>) RET2FLAG);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7a206f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index d425266..42d1eb7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -350,7 +350,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<V> putAsync(K key, V val,
@Nullable CacheEntryPredicate[] filter) {
- return cache.putAsync0(key, val, null, -1, filter);
+ return cache.putAsync0(key, val, null, filter);
}
/** {@inheritDoc} */
@@ -414,7 +414,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val,
@Nullable CacheEntryPredicate[] filter) {
- return cache.putxAsync0(key, val, null, -1, filter);
+ return cache.putxAsync0(key, val, null, filter);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7a206f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index e5ec89a..961d830 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -301,15 +301,15 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public V put0(K key, V val, @Nullable GridCacheEntryEx cached, long ttl,
+ @Override public V put0(K key, V val, @Nullable GridCacheEntryEx cached,
@Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
- return putAsync0(key, val, cached, ttl, filter).get();
+ return putAsync0(key, val, cached, filter).get();
}
/** {@inheritDoc} */
@Override public boolean putx0(K key, V val, @Nullable GridCacheEntryEx cached,
- long ttl, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return putxAsync0(key, val, cached, ttl, filter).get();
+ @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return putxAsync0(key, val, cached, filter).get();
}
/** {@inheritDoc} */
@@ -320,8 +320,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<V> putAsync0(K key, V val, @Nullable GridCacheEntryEx entry,
- long ttl, @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<V> putAsync0(K key, V val, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
return updateAllAsync0(F0.asMap(key, val),
@@ -337,7 +336,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> putxAsync0(K key, V val, @Nullable GridCacheEntryEx entry, long ttl,
+ @Override public IgniteInternalFuture<Boolean> putxAsync0(K key, V val, @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7a206f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index cbea18c..db1e8c0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -392,19 +392,17 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
K key,
V val,
@Nullable GridCacheEntryEx cached,
- long ttl,
@Nullable CacheEntryPredicate[] filter
) throws IgniteCheckedException {
- return dht.put0(key, val, cached, ttl, filter);
+ return dht.put0(key, val, cached, filter);
}
/** {@inheritDoc} */
@Override public boolean putx0(K key,
V val,
@Nullable GridCacheEntryEx cached,
- long ttl,
@Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return dht.putx0(key, val, cached, ttl, filter);
+ return dht.putx0(key, val, cached, filter);
}
/** {@inheritDoc} */
@@ -419,9 +417,8 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
@Override public IgniteInternalFuture<V> putAsync0(K key,
V val,
@Nullable GridCacheEntryEx entry,
- long ttl,
@Nullable CacheEntryPredicate... filter) {
- return dht.putAsync0(key, val, entry, ttl, filter);
+ return dht.putAsync0(key, val, entry, filter);
}
/** {@inheritDoc} */
@@ -429,9 +426,8 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
@Override public IgniteInternalFuture<Boolean> putxAsync0(K key,
V val,
@Nullable GridCacheEntryEx entry,
- long ttl,
@Nullable CacheEntryPredicate... filter) {
- return dht.putxAsync0(key, val, entry, ttl, filter);
+ return dht.putxAsync0(key, val, entry, filter);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7a206f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index ad78819..8c6f777 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -103,7 +103,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
@Override public V put0(K key,
V val,
@Nullable GridCacheEntryEx cached,
- long ttl,
@Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
A.notNull(key, "key", val, "val");
@@ -123,7 +122,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
@Override public boolean putx0(K key,
V val,
@Nullable GridCacheEntryEx cached,
- long ttl,
@Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
A.notNull(key, "key", val, "val");
@@ -160,7 +158,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
@Override public IgniteInternalFuture<V> putAsync0(K key,
V val,
@Nullable GridCacheEntryEx entry,
- long ttl,
@Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
@@ -177,7 +174,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
@Override public IgniteInternalFuture<Boolean> putxAsync0(K key,
V val,
@Nullable GridCacheEntryEx entry,
- long ttl,
@Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
[5/6] incubator-ignite git commit: #ignite-683:
Posted by sb...@apache.org.
#ignite-683:
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/064bcd89
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/064bcd89
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/064bcd89
Branch: refs/heads/ignite-683-1
Commit: 064bcd897d3466b53b1b20785de5873f56cd3d52
Parents: ac92d78
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 9 16:40:48 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 9 16:40:48 2015 +0300
----------------------------------------------------------------------
.../processors/cache/CacheProjection.java | 47 +++-------------
.../processors/cache/GridCacheAdapter.java | 56 +++++++++++++++-----
.../cache/GridCacheProjectionImpl.java | 47 +++++++---------
.../processors/cache/GridCacheProxyImpl.java | 44 +++++----------
.../distributed/near/GridNearCacheAdapter.java | 2 +-
.../GridAtomicCacheQueueImpl.java | 4 +-
.../GridTransactionalCacheQueueImpl.java | 2 +-
.../query/h2/GridH2IndexingGeoSelfTest.java | 2 +-
8 files changed, 87 insertions(+), 117 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/064bcd89/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
index 736c156..f3215d1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
@@ -458,15 +458,13 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
- * @param filter Optional filter to check prior to putting value in cache. Note
- * that filter check is atomic with put operation.
* @return Previous value associated with specified key, or {@code null}
* if entry did not pass the filter, or if there was no mapping for the key in swap
* or in persistent storage.
* @throws NullPointerException If either key or value are {@code null}.
* @throws IgniteCheckedException If put operation failed.
*/
- @Nullable public V put(K key, V val, @Nullable CacheEntryPredicate... filter)
+ @Nullable public V put(K key, V val)
throws IgniteCheckedException;
/**
@@ -493,12 +491,10 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
- * @param filter Optional filter to check prior to putting value in cache. Note
- * that filter check is atomic with put operation.
* @return Future for the put operation.
* @throws NullPointerException If either key or value are {@code null}.
*/
- public IgniteInternalFuture<V> putAsync(K key, V val, @Nullable CacheEntryPredicate... filter);
+ public IgniteInternalFuture<V> putAsync(K key, V val);
/**
* Stores given key-value pair in cache. If filters are provided, then entries will
@@ -518,15 +514,13 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
- * @param filter Optional filter to check prior to putting value in cache. Note
- * that filter check is atomic with put operation.
* @return {@code True} if optional filter passed and value was stored in cache,
* {@code false} otherwise. Note that this method will return {@code true} if filter is not
* specified.
* @throws NullPointerException If either key or value are {@code null}.
* @throws IgniteCheckedException If put operation failed.
*/
- public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
+ public boolean putx(K key, V val)
throws IgniteCheckedException;
/**
@@ -547,14 +541,12 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
- * @param filter Optional filter to check prior to putting value in cache. Note
- * that filter check is atomic with put operation.
* @return Future for the put operation. Future will return {@code true} if optional filter
* passed and value was stored in cache, {@code false} otherwise. Note that future will
* return {@code true} if filter is not specified.
* @throws NullPointerException If either key or value are {@code null}.
*/
- public IgniteInternalFuture<Boolean> putxAsync(K key, V val, @Nullable CacheEntryPredicate... filter);
+ public IgniteInternalFuture<Boolean> putxAsync(K key, V val);
/**
* Stores given key-value pair in cache only if cache had no previous mapping for it. If cache
@@ -800,12 +792,9 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
* if there is one.
*
* @param m Key-value pairs to store in cache.
- * @param filter Optional entry filter. If provided, then entry will
- * be stored only if the filter returned {@code true}.
* @throws IgniteCheckedException If put operation failed.
*/
- public void putAll(@Nullable Map<? extends K, ? extends V> m,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
+ public void putAll(@Nullable Map<? extends K, ? extends V> m) throws IgniteCheckedException;
/**
* Asynchronously stores given key-value pairs in cache. If filters are provided, then entries will
@@ -819,12 +808,9 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
* if there is one.
*
* @param m Key-value pairs to store in cache.
- * @param filter Optional entry filter. If provided, then entry will
- * be stored only if the filter returned {@code true}.
* @return Future for putAll operation.
*/
- public IgniteInternalFuture<?> putAllAsync(@Nullable Map<? extends K, ? extends V> m,
- @Nullable CacheEntryPredicate... filter);
+ public IgniteInternalFuture<?> putAllAsync(@Nullable Map<? extends K, ? extends V> m);
/**
* Set of keys cached on this node. You can remove elements from this set, but you cannot add elements
@@ -842,23 +828,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
public Set<K> keySet();
/**
- * Set of keys cached on this node. You can remove elements from this set, but you cannot add elements
- * to this set. All removal operation will be reflected on the cache itself.
- * <p>
- * Iterator over this set will not fail if set was concurrently updated
- * by another thread. This means that iterator may or may not return latest
- * keys depending on whether they were added before or after current
- * iterator position.
- * <p>
- * NOTE: this operation is not distributed and returns only the keys cached on this node.
- *
- * @param filter Optional filter to check prior to getting key form cache. Note
- * that filter is checked atomically together with get operation.
- * @return Key set for this cache projection.
- */
- public Set<K> keySet(@Nullable CacheEntryPredicate... filter);
-
- /**
* Set of keys for which this node is primary.
* This set is dynamic and may change with grid topology changes.
* Note that this set will contain mappings for all keys, even if their values are
@@ -1184,14 +1153,12 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
* if there is one.
*
* @param key Key whose mapping is to be removed from cache.
- * @param filter Optional filter to check prior to removing value form cache. Note
- * that filter is checked atomically together with remove operation.
* @return Previous value associated with specified key, or {@code null}
* if there was no value for this key.
* @throws NullPointerException If key is {@code null}.
* @throws IgniteCheckedException If remove operation failed.
*/
- @Nullable public V remove(K key, @Nullable CacheEntryPredicate... filter)
+ @Nullable public V remove(K key)
throws IgniteCheckedException;
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/064bcd89/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 c8382d7..8019940 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
@@ -2004,12 +2004,18 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
}
- /** {@inheritDoc} */
- @Override public V put(K key, V val, @Nullable CacheEntryPredicate... filter)
+ /** */
+ public V put(K key, V val, @Nullable CacheEntryPredicate... filter)
throws IgniteCheckedException {
return put0(key, val, filter);
}
+ /** {@inheritDoc} */
+ @Override public V put(K key, V val)
+ throws IgniteCheckedException {
+ return put0(key, val, CU.empty0());
+ }
+
/**
* Internal method that is called from {@link CacheEntryImpl}.
*
@@ -2080,8 +2086,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> putAsync(K key, V val,
- @Nullable CacheEntryPredicate[] filter) {
+ @Override public IgniteInternalFuture<V> putAsync(K key, V val) {
+ return putAsync(key, val, CU.empty0());
+ }
+
+ /** */
+ public IgniteInternalFuture<V> putAsync(K key, V val,
+ @Nullable CacheEntryPredicate[] filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
final long start = statsEnabled ? System.nanoTime() : 0L;
@@ -2123,7 +2134,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public boolean putx(final K key, final V val,
+ @Override public boolean putx(final K key, final V val) throws IgniteCheckedException {
+ return putx(key, val, CU.empty0());
+ }
+
+ /** */
+ public boolean putx(final K key, final V val,
final CacheEntryPredicate[] filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2390,7 +2406,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val,
+ @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val) {
+ return putxAsync(key, val, CU.empty0());
+ }
+
+ /** {@inheritDoc} */
+ public IgniteInternalFuture<Boolean> putxAsync(K key, V val,
@Nullable CacheEntryPredicate... filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2717,7 +2738,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public void putAll(@Nullable final Map<? extends K, ? extends V> m,
+ @Override public void putAll(@Nullable final Map<? extends K, ? extends V> m) throws IgniteCheckedException {
+ putAll(m, CU.empty0());
+ }
+
+ /** */
+ public void putAll(@Nullable final Map<? extends K, ? extends V> m,
final CacheEntryPredicate[] filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2746,7 +2772,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<?> putAllAsync(final Map<? extends K, ? extends V> m,
+ @Override public IgniteInternalFuture<?> putAllAsync(final Map<? extends K, ? extends V> m) {
+ return putAllAsync(m, CU.empty0());
+ }
+
+ /** */
+ public IgniteInternalFuture<?> putAllAsync(final Map<? extends K, ? extends V> m,
@Nullable final CacheEntryPredicate... filter) {
if (F.isEmpty(m))
return new GridFinishedFuture<Object>();
@@ -2768,9 +2799,9 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Nullable @Override public V remove(K key, CacheEntryPredicate[] filter)
+ @Nullable @Override public V remove(K key)
throws IgniteCheckedException {
- return remove0(key, filter);
+ return remove0(key, CU.empty0());
}
/**
@@ -2781,8 +2812,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @return Previous value.
* @throws IgniteCheckedException If failed.
*/
- public V remove0(final K key,
- @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
+ public V remove0(final K key, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
long start = statsEnabled ? System.nanoTime() : 0L;
@@ -4601,7 +4631,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* @param filter Filters to evaluate.
* @return Key set.
*/
- @Override public Set<K> keySet(@Nullable CacheEntryPredicate... filter) {
+ public Set<K> keySet(@Nullable CacheEntryPredicate... filter) {
return map.keySet(filter);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/064bcd89/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 96a78b3..3fe2857 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -342,21 +342,19 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public V put(K key, V val, @Nullable CacheEntryPredicate[] filter)
+ @Override public V put(K key, V val)
throws IgniteCheckedException {
- return putAsync(key, val, filter).get();
+ return putAsync(key, val).get();
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> putAsync(K key, V val,
- @Nullable CacheEntryPredicate[] filter) {
- return cache.putAsync0(key, val, filter);
+ @Override public IgniteInternalFuture<V> putAsync(K key, V val) {
+ return cache.putAsync0(key, val, CU.empty0());
}
/** {@inheritDoc} */
- @Override public boolean putx(K key, V val,
- @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
- return putxAsync(key, val, filter).get();
+ @Override public boolean putx(K key, V val) throws IgniteCheckedException {
+ return cache.putxAsync0(key, val, CU.empty0()).get();
}
/** {@inheritDoc} */
@@ -412,9 +410,8 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val,
- @Nullable CacheEntryPredicate[] filter) {
- return cache.putxAsync0(key, val, filter);
+ @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val) {
+ return cache.putxAsync0(key, val, CU.empty0());
}
/** {@inheritDoc} */
@@ -424,7 +421,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<V> putIfAbsentAsync(K key, V val) {
- return putAsync(key, val, cctx.noValArray());
+ return cache.putAsync0(key, val, cctx.noValArray());
}
/** {@inheritDoc} */
@@ -434,7 +431,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> putxIfAbsentAsync(K key, V val) {
- return putxAsync(key, val, cctx.noValArray());
+ return cache.putxAsync0(key, val, cctx.noValArray());
}
/** {@inheritDoc} */
@@ -444,7 +441,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<V> replaceAsync(K key, V val) {
- return putAsync(key, val, cctx.hasValArray());
+ return cache.putAsync0(key, val, cctx.hasValArray());
}
/** {@inheritDoc} */
@@ -454,7 +451,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> replacexAsync(K key, V val) {
- return putxAsync(key, val, cctx.hasValArray());
+ return cache.putxAsync0(key, val, cctx.hasValArray());
}
/** {@inheritDoc} */
@@ -470,15 +467,13 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public void putAll(Map<? extends K, ? extends V> m,
- @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
- putAllAsync(m, filter).get();
+ @Override public void putAll(Map<? extends K, ? extends V> m) throws IgniteCheckedException {
+ putAllAsync(m).get();
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<?> putAllAsync(Map<? extends K, ? extends V> m,
- @Nullable CacheEntryPredicate[] filter) {
- return cache.putAllAsync(m, filter);
+ @Override public IgniteInternalFuture<?> putAllAsync(Map<? extends K, ? extends V> m) {
+ return cache.putAllAsync(m, CU.empty0());
}
/** {@inheritDoc} */
@@ -487,11 +482,6 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public Set<K> keySet(@Nullable CacheEntryPredicate... filter) {
- return cache.keySet(filter);
- }
-
- /** {@inheritDoc} */
@Override public Set<K> primaryKeySet() {
return cache.primaryKeySet();
}
@@ -632,9 +622,8 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public V remove(K key,
- @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
- return removeAsync(key, filter).get();
+ @Override public V remove(K key) throws IgniteCheckedException {
+ return removeAsync(key, CU.empty0()).get();
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/064bcd89/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index d79615e..4615ee8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -565,12 +565,12 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Nullable @Override public V put(K key, V val, @Nullable CacheEntryPredicate[] filter)
+ @Nullable @Override public V put(K key, V val)
throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.put(key, val, filter);
+ return delegate.put(key, val);
}
finally {
gate.leave(prev);
@@ -578,12 +578,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> putAsync(K key, V val,
- @Nullable CacheEntryPredicate[] filter) {
+ @Override public IgniteInternalFuture<V> putAsync(K key, V val) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.putAsync(key, val, filter);
+ return delegate.putAsync(key, val);
}
finally {
gate.leave(prev);
@@ -591,12 +590,12 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public boolean putx(K key, V val, @Nullable CacheEntryPredicate[] filter)
+ @Override public boolean putx(K key, V val)
throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.putx(key, val, filter);
+ return delegate.putx(key, val);
}
finally {
gate.leave(prev);
@@ -714,12 +713,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val,
- @Nullable CacheEntryPredicate[] filter) {
+ @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.putxAsync(key, val, filter);
+ return delegate.putxAsync(key, val);
}
finally {
gate.leave(prev);
@@ -847,12 +845,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public void putAll(@Nullable Map<? extends K, ? extends V> m,
- @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
+ @Override public void putAll(@Nullable Map<? extends K, ? extends V> m) throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- delegate.putAll(m, filter);
+ delegate.putAll(m);
}
finally {
gate.leave(prev);
@@ -860,12 +857,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<?> putAllAsync(@Nullable Map<? extends K, ? extends V> m,
- @Nullable CacheEntryPredicate[] filter) {
+ @Override public IgniteInternalFuture<?> putAllAsync(@Nullable Map<? extends K, ? extends V> m) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.putAllAsync(m, filter);
+ return delegate.putAllAsync(m);
}
finally {
gate.leave(prev);
@@ -885,18 +881,6 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public Set<K> keySet(@Nullable CacheEntryPredicate... filter) {
- GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
- try {
- return delegate.keySet(filter);
- }
- finally {
- gate.leave(prev);
- }
- }
-
- /** {@inheritDoc} */
@Override public Set<K> primaryKeySet() {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1251,12 +1235,12 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Nullable @Override public V remove(K key, @Nullable CacheEntryPredicate[] filter)
+ @Nullable @Override public V remove(K key)
throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.remove(key, filter);
+ return delegate.remove(key);
}
finally {
gate.leave(prev);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/064bcd89/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 5986b15..e70a632 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
@@ -655,7 +655,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
currIter.remove();
try {
- GridNearCacheAdapter.this.remove(currEntry.getKey(), CU.empty0());
+ GridNearCacheAdapter.this.remove(currEntry.getKey());
}
catch (IgniteCheckedException e) {
throw new IgniteException(e);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/064bcd89/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
index a48d7b4..70e72a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
@@ -100,7 +100,7 @@ public class GridAtomicCacheQueueImpl<T> extends GridCacheQueueAdapter<T> {
while (true) {
try {
- T data = (T)cache.remove(key, null);
+ T data = (T)cache.remove(key);
if (data != null)
return data;
@@ -109,7 +109,7 @@ public class GridAtomicCacheQueueImpl<T> extends GridCacheQueueAdapter<T> {
stop = U.currentTimeMillis() + RETRY_TIMEOUT;
while (U.currentTimeMillis() < stop ) {
- data = (T)cache.remove(key, null);
+ data = (T)cache.remove(key);
if (data != null)
return data;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/064bcd89/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
index 801e27f..c14011c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
@@ -108,7 +108,7 @@ public class GridTransactionalCacheQueueImpl<T> extends GridCacheQueueAdapter<T>
if (idx != null) {
checkRemoved(idx);
- retVal = (T)cache.remove(itemKey(idx), null);
+ retVal = (T)cache.remove(itemKey(idx));
assert retVal != null : idx;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/064bcd89/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
index 07abaf1..883bd20 100644
--- a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
+++ b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
@@ -100,7 +100,7 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest {
checkPoints(res, "B", "C", "D");
// Remove B.
- cache.remove(1, CU.empty0());
+ cache.remove(1);
res = qry.execute(r.read("POLYGON((5 70, 5 80, 30 80, 30 70, 5 70))")).get();
[4/6] incubator-ignite git commit: #ignite-707: remove
GridCacheEntryEx cached from cache methods.
Posted by sb...@apache.org.
#ignite-707: remove GridCacheEntryEx cached from cache methods.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ac92d78d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ac92d78d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ac92d78d
Branch: refs/heads/ignite-683-1
Commit: ac92d78d6ef7e2bc7a51b5caead6e92cd78ead0b
Parents: c7a206f
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 9 16:17:24 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 9 16:17:24 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 50 ++++++++------------
.../cache/GridCacheProjectionImpl.java | 8 ++--
.../dht/atomic/GridDhtAtomicCache.java | 31 +++++-------
.../distributed/near/GridNearAtomicCache.java | 27 ++++-------
.../local/atomic/GridLocalAtomicCache.java | 8 ----
5 files changed, 45 insertions(+), 79 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac92d78d/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 ff16d13..c8382d7 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
@@ -2007,7 +2007,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
/** {@inheritDoc} */
@Override public V put(K key, V val, @Nullable CacheEntryPredicate... filter)
throws IgniteCheckedException {
- return put0(key, val, null, filter);
+ return put0(key, val, filter);
}
/**
@@ -2015,14 +2015,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
*
* @param key Key.
* @param val Value.
- * @param cached Cached entry. If not provided, equivalent to {CacheProjection#put}.
* @param filter Optional filter.
* @return Previous value.
* @throws IgniteCheckedException If failed.
*/
@Nullable public V put0(final K key,
final V val,
- @Nullable final GridCacheEntryEx cached,
@Nullable final CacheEntryPredicate[] filter)
throws IgniteCheckedException
{
@@ -2039,7 +2037,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
V prevVal = syncOp(new SyncOp<V>(true) {
@Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
- return (V)tx.putAllAsync(ctx, F.t(key, val), true, cached, -1, filter).get().value();
+ return (V)tx.putAllAsync(ctx, F.t(key, val), true, null, -1, filter).get().value();
}
@Override public String toString() {
@@ -2058,12 +2056,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
*
* @param key Key.
* @param val Value.
- * @param cached Cached entry. If not provided, equivalent to {CacheProjection#put}.
* @param filter Optional filter.
* @return Previous value.
* @throws IgniteCheckedException If failed.
*/
- public boolean putx0(final K key, final V val, @Nullable final GridCacheEntryEx cached, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
+ public boolean putx0(final K key, final V val, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2073,7 +2070,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return syncOp(new SyncOp<Boolean>(true) {
@Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
- return tx.putAllAsync(ctx, F.t(key, val), false, cached, -1, filter).get().success();
+ return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, filter).get().success();
}
@Override public String toString() {
@@ -2089,7 +2086,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
final long start = statsEnabled ? System.nanoTime() : 0L;
- IgniteInternalFuture<V> fut = putAsync0(key, val, null, filter);
+ IgniteInternalFuture<V> fut = putAsync0(key, val, filter);
if (statsEnabled)
fut.listen(new UpdatePutAndGetTimeStatClosure<V>(metrics0(), start));
@@ -2102,11 +2099,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
*
* @param key Key.
* @param val Value.
- * @param entry Optional cached entry.
* @param filter Optional filter.
* @return Put operation future.
*/
- public IgniteInternalFuture<V> putAsync0(final K key, final V val, @Nullable final GridCacheEntryEx entry, @Nullable final CacheEntryPredicate... filter) {
+ public IgniteInternalFuture<V> putAsync0(final K key, final V val, @Nullable final CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2116,7 +2112,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return asyncOp(new AsyncOp<V>(key) {
@Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
- return tx.putAllAsync(ctx, F.t(key, val), true, entry, -1, filter)
+ return tx.putAllAsync(ctx, F.t(key, val), true, null, -1, filter)
.chain((IgniteClosure<IgniteInternalFuture<GridCacheReturn>, V>)RET2VAL);
}
@@ -2400,7 +2396,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
final long start = statsEnabled ? System.nanoTime() : 0L;
- IgniteInternalFuture<Boolean> fut = putxAsync0(key, val, null, filter);
+ IgniteInternalFuture<Boolean> fut = putxAsync0(key, val, filter);
if (statsEnabled)
fut.listen(new UpdatePutTimeStatClosure<Boolean>(metrics0(), start));
@@ -2413,12 +2409,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
*
* @param key Key.
* @param val Value.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
* @param filter Optional filter.
* @return Putx operation future.
*/
public IgniteInternalFuture<Boolean> putxAsync0(final K key, final V val,
- @Nullable final GridCacheEntryEx entry,
@Nullable final CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
@@ -2429,7 +2423,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
return asyncOp(new AsyncOp<Boolean>(key) {
@Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
- return tx.putAllAsync(ctx, F.t(key, val), false, entry, -1, filter).chain(
+ return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, filter).chain(
(IgniteClosure<IgniteInternalFuture<GridCacheReturn>, Boolean>) RET2FLAG);
}
@@ -2776,19 +2770,18 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
/** {@inheritDoc} */
@Nullable @Override public V remove(K key, CacheEntryPredicate[] filter)
throws IgniteCheckedException {
- return remove0(key, null, filter);
+ return remove0(key, filter);
}
/**
* Internal method that is called from {@link CacheEntryImpl}.
*
* @param key Key to remove.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
* @param filter Optional filter.
* @return Previous value.
* @throws IgniteCheckedException If failed.
*/
- public V remove0(final K key, @Nullable final GridCacheEntryEx entry,
+ public V remove0(final K key,
@Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2801,7 +2794,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
V prevVal = syncOp(new SyncOp<V>(true) {
@Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
- V ret = (V) tx.removeAllAsync(ctx, Collections.singletonList(key), entry, true, filter).get().value();
+ V ret = (V) tx.removeAllAsync(ctx, Collections.singletonList(key), null, true, filter).get().value();
if (ctx.config().getInterceptor() != null)
return (V) ctx.config().getInterceptor().onBeforeRemove(new CacheEntryImpl(key, ret)).get2();
@@ -2826,7 +2819,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
final long start = statsEnabled ? System.nanoTime() : 0L;
- IgniteInternalFuture<V> fut = removeAsync0(key, null, filter);
+ IgniteInternalFuture<V> fut = removeAsync0(key, filter);
if (statsEnabled)
fut.listen(new UpdateRemoveTimeStatClosure<V>(metrics0(), start));
@@ -2838,11 +2831,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* Internal method that is called from {@link CacheEntryImpl}.
*
* @param key Key to remove.
- * @param entry Optional cached entry.
* @param filter Optional filter.
* @return Put operation future.
*/
- public IgniteInternalFuture<V> removeAsync0(final K key, @Nullable final GridCacheEntryEx entry,
+ public IgniteInternalFuture<V> removeAsync0(final K key,
@Nullable final CacheEntryPredicate... filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2936,7 +2928,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
long start = statsEnabled ? System.nanoTime() : 0L;
- boolean rmv = removex0(key, null, filter);
+ boolean rmv = removex0(key, filter);
if (statsEnabled && rmv)
metrics0().addRemoveTimeNanos(System.nanoTime() - start);
@@ -2948,12 +2940,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
* Internal method that is called from {@link CacheEntryImpl}.
*
* @param key Key to remove.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
* @param filter Optional filter.
* @return Previous value.
* @throws IgniteCheckedException If failed.
*/
- public boolean removex0(final K key, @Nullable final GridCacheEntryEx entry,
+ public boolean removex0(final K key,
@Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2966,7 +2957,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
boolean rmv = syncOp(new SyncOp<Boolean>(true) {
@Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
- return tx.removeAllAsync(ctx, Collections.singletonList(key), entry, false, filter).get().success();
+ return tx.removeAllAsync(ctx, Collections.singletonList(key), null, false, filter).get().success();
}
@Override public String toString() {
@@ -2984,18 +2975,17 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
@Override public IgniteInternalFuture<Boolean> removexAsync(K key, CacheEntryPredicate... filter) {
A.notNull(key, "key");
- return removexAsync0(key, null, filter);
+ return removexAsync0(key, filter);
}
/**
* Internal method that is called from {@link CacheEntryImpl}.
*
* @param key Key to remove.
- * @param entry Cached entry. If not provided, equivalent to {CacheProjection#put}.
* @param filter Optional filter.
* @return Putx operation future.
*/
- public IgniteInternalFuture<Boolean> removexAsync0(final K key, @Nullable final GridCacheEntryEx entry,
+ public IgniteInternalFuture<Boolean> removexAsync0(final K key,
@Nullable final CacheEntryPredicate... filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -3008,7 +2998,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
IgniteInternalFuture<Boolean> fut = asyncOp(new AsyncOp<Boolean>(key) {
@Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter tx) {
- return tx.removeAllAsync(ctx, Collections.singletonList(key), entry, false, filter).chain(
+ return tx.removeAllAsync(ctx, Collections.singletonList(key), null, false, filter).chain(
(IgniteClosure<IgniteInternalFuture<GridCacheReturn>, Boolean>)RET2FLAG);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac92d78d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 42d1eb7..96a78b3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -350,7 +350,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<V> putAsync(K key, V val,
@Nullable CacheEntryPredicate[] filter) {
- return cache.putAsync0(key, val, null, filter);
+ return cache.putAsync0(key, val, filter);
}
/** {@inheritDoc} */
@@ -414,7 +414,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val,
@Nullable CacheEntryPredicate[] filter) {
- return cache.putxAsync0(key, val, null, filter);
+ return cache.putxAsync0(key, val, filter);
}
/** {@inheritDoc} */
@@ -639,7 +639,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate[] filter) {
- return cache.removeAsync0(key, null, filter);
+ return cache.removeAsync0(key, filter);
}
/** {@inheritDoc} */
@@ -662,7 +662,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> removexAsync(K key,
@Nullable CacheEntryPredicate[] filter) {
- return cache.removexAsync0(key, null, filter);
+ return cache.removexAsync0(key, filter);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac92d78d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 961d830..026a4f6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -301,15 +301,13 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public V put0(K key, V val, @Nullable GridCacheEntryEx cached,
- @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
- return putAsync0(key, val, cached, filter).get();
+ @Override public V put0(K key, V val, @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
+ return putAsync0(key, val, filter).get();
}
/** {@inheritDoc} */
- @Override public boolean putx0(K key, V val, @Nullable GridCacheEntryEx cached,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return putxAsync0(key, val, cached, filter).get();
+ @Override public boolean putx0(K key, V val, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return putxAsync0(key, val, filter).get();
}
/** {@inheritDoc} */
@@ -320,7 +318,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<V> putAsync0(K key, V val, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<V> putAsync0(K key, V val, @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
return updateAllAsync0(F0.asMap(key, val),
@@ -336,8 +334,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> putxAsync0(K key, V val, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<Boolean> putxAsync0(K key, V val, @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
return updateAllAsync0(F0.asMap(key, val),
@@ -500,15 +497,13 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public V remove0(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return removeAsync0(key, entry, filter).get();
+ @Override public V remove0(K key, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return removeAsync0(key, filter).get();
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<V> removeAsync0(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<V> removeAsync0(K key, @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
return removeAllAsync0(Collections.singletonList(key), null, true, false, filter);
@@ -529,15 +524,13 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public boolean removex0(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return removexAsync0(key, entry, filter).get();
+ @Override public boolean removex0(K key, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return removexAsync0(key, filter).get();
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> removexAsync0(K key, @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<Boolean> removexAsync0(K key, @Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
return removeAllAsync0(Collections.singletonList(key), null, false, false, filter);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac92d78d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index db1e8c0..9fbd01c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -391,18 +391,16 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
@Override public V put0(
K key,
V val,
- @Nullable GridCacheEntryEx cached,
@Nullable CacheEntryPredicate[] filter
) throws IgniteCheckedException {
- return dht.put0(key, val, cached, filter);
+ return dht.put0(key, val, filter);
}
/** {@inheritDoc} */
@Override public boolean putx0(K key,
V val,
- @Nullable GridCacheEntryEx cached,
@Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return dht.putx0(key, val, cached, filter);
+ return dht.putx0(key, val, filter);
}
/** {@inheritDoc} */
@@ -416,18 +414,16 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
@SuppressWarnings("unchecked")
@Override public IgniteInternalFuture<V> putAsync0(K key,
V val,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) {
- return dht.putAsync0(key, val, entry, filter);
+ return dht.putAsync0(key, val, filter);
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public IgniteInternalFuture<Boolean> putxAsync0(K key,
V val,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) {
- return dht.putxAsync0(key, val, entry, filter);
+ return dht.putxAsync0(key, val, filter);
}
/** {@inheritDoc} */
@@ -569,17 +565,15 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
/** {@inheritDoc} */
@Override public V remove0(K key,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return dht.remove0(key, entry, filter);
+ return dht.remove0(key, filter);
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public IgniteInternalFuture<V> removeAsync0(K key,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) {
- return dht.removeAsync0(key, entry, filter);
+ return dht.removeAsync0(key, filter);
}
/** {@inheritDoc} */
@@ -596,17 +590,14 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
/** {@inheritDoc} */
@Override public boolean removex0(K key,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- return dht.removex0(key, entry, filter);
+ return dht.removex0(key, filter);
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> removexAsync0(K key,
- @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
- return dht.removexAsync0(key, entry, filter);
+ @Override public IgniteInternalFuture<Boolean> removexAsync0(K key, @Nullable CacheEntryPredicate... filter) {
+ return dht.removexAsync0(key, filter);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac92d78d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index 8c6f777..fa7fb72 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -102,7 +102,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
@SuppressWarnings("unchecked")
@Override public V put0(K key,
V val,
- @Nullable GridCacheEntryEx cached,
@Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
A.notNull(key, "key", val, "val");
@@ -121,7 +120,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
@SuppressWarnings("unchecked")
@Override public boolean putx0(K key,
V val,
- @Nullable GridCacheEntryEx cached,
@Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
A.notNull(key, "key", val, "val");
@@ -157,7 +155,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
@SuppressWarnings("unchecked")
@Override public IgniteInternalFuture<V> putAsync0(K key,
V val,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
@@ -173,7 +170,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
@SuppressWarnings("unchecked")
@Override public IgniteInternalFuture<Boolean> putxAsync0(K key,
V val,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
@@ -320,7 +316,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public V remove0(K key,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
return (V)updateAllInternal(DELETE,
Collections.singleton(key),
@@ -336,7 +331,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public IgniteInternalFuture<V> removeAsync0(K key,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) {
return removeAllAsync0(Collections.singletonList(key), true, false, filter);
}
@@ -365,7 +359,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public boolean removex0(K key,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -392,7 +385,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public IgniteInternalFuture<Boolean> removexAsync0(K key,
- @Nullable GridCacheEntryEx entry,
@Nullable CacheEntryPredicate... filter) {
A.notNull(key, "key");
[6/6] incubator-ignite git commit: #ignite-683: Remove all methods
with filters from CacheProjection.
Posted by sb...@apache.org.
#ignite-683: Remove all methods with filters from CacheProjection.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d6ae9036
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d6ae9036
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d6ae9036
Branch: refs/heads/ignite-683-1
Commit: d6ae9036ddd3f2c14c3c01bd73752c236eb11161
Parents: 064bcd8
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 9 16:52:46 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 9 16:52:46 2015 +0300
----------------------------------------------------------------------
.../processors/cache/CacheProjection.java | 24 ++++--------------
.../processors/cache/GridCacheAdapter.java | 26 ++++++++++++++------
.../cache/GridCacheProjectionImpl.java | 26 +++++++++-----------
.../processors/cache/GridCacheProxyImpl.java | 23 ++++++++---------
.../dht/atomic/GridDhtAtomicCache.java | 2 +-
.../local/atomic/GridLocalAtomicCache.java | 2 +-
.../GridAtomicCacheQueueImpl.java | 4 +--
7 files changed, 48 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d6ae9036/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
index f3215d1..31dab7e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
@@ -1180,12 +1180,10 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
* if there is one.
*
* @param key Key whose mapping is to be removed from cache.
- * @param filter Optional filter to check prior to removing value form cache. Note
- * that filter is checked atomically together with remove operation.
* @return Future for the remove operation.
* @throws NullPointerException if the key is {@code null}.
*/
- public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate... filter);
+ public IgniteInternalFuture<V> removeAsync(K key);
/**
* Removes given key mapping from cache.
@@ -1200,15 +1198,12 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
* if there is one.
*
* @param key Key whose mapping is to be removed from cache.
- * @param filter Optional filter to check prior to removing value form cache. Note
- * that filter is checked atomically together with remove operation.
* @return {@code True} if filter passed validation and entry was removed, {@code false} otherwise.
* Note that if filter is not specified, this method will return {@code true}.
* @throws NullPointerException if the key is {@code null}.
* @throws IgniteCheckedException If remove failed.
*/
- public boolean removex(K key, @Nullable CacheEntryPredicate... filter)
- throws IgniteCheckedException;
+ public boolean removex(K key) throws IgniteCheckedException;
/**
* Asynchronously removes given key mapping from cache.
@@ -1223,15 +1218,12 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
* if there is one.
*
* @param key Key whose mapping is to be removed from cache.
- * @param filter Optional filter to check prior to removing value form cache. Note
- * that filter is checked atomically together with remove operation.
* @return Future for the remove operation. The future will return {@code true}
* if optional filters passed validation and remove did occur, {@code false} otherwise.
* Note that if filter is not specified, this method will return {@code true}.
* @throws NullPointerException if the key is {@code null}.
*/
- public IgniteInternalFuture<Boolean> removexAsync(K key,
- @Nullable CacheEntryPredicate... filter);
+ public IgniteInternalFuture<Boolean> removexAsync(K key);
/**
* Removes given key mapping from cache if one exists and value is equal to the passed in value.
@@ -1282,12 +1274,9 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
* if there is one.
*
* @param keys Keys whose mappings are to be removed from cache.
- * @param filter Optional filter to check prior to removing value form cache. Note
- * that filter is checked atomically together with remove operation.
* @throws IgniteCheckedException If remove failed.
*/
- public void removeAll(@Nullable Collection<? extends K> keys,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException;
+ public void removeAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException;
/**
* Asynchronously removes given key mappings from cache for entries for which the optionally
@@ -1300,13 +1289,10 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> {
* if there is one.
*
* @param keys Keys whose mappings are to be removed from cache.
- * @param filter Optional filter to check prior to removing value form cache. Note
- * that filter is checked atomically together with remove operation.
* @return Future for the remove operation. The future will complete whenever
* remove operation completes.
*/
- public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys,
- @Nullable CacheEntryPredicate... filter);
+ public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys);
/**
* Removes mappings from cache for entries for which the optionally passed in filters do
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d6ae9036/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 8019940..6a97777 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
@@ -2844,12 +2844,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<V> removeAsync(K key) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
final long start = statsEnabled ? System.nanoTime() : 0L;
- IgniteInternalFuture<V> fut = removeAsync0(key, filter);
+ IgniteInternalFuture<V> fut = removeAsync0(key, CU.empty0());
if (statsEnabled)
fut.listen(new UpdateRemoveTimeStatClosure<V>(metrics0(), start));
@@ -2894,7 +2894,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public void removeAll(final Collection<? extends K> keys,
+ @Override public void removeAll(final Collection<? extends K> keys) throws IgniteCheckedException {
+ removeAll(keys, CU.empty0());
+ }
+
+ /** */
+ public void removeAll(final Collection<? extends K> keys,
final CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2923,7 +2928,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable final Collection<? extends K> keys,
+ @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable final Collection<? extends K> keys) {
+ return removeAllAsync(keys, CU.empty0());
+ }
+
+ /** {@inheritDoc} */
+ public IgniteInternalFuture<?> removeAllAsync(@Nullable final Collection<? extends K> keys,
final CacheEntryPredicate... filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
@@ -2952,13 +2962,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public boolean removex(final K key, final CacheEntryPredicate... filter)
+ @Override public boolean removex(final K key)
throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
long start = statsEnabled ? System.nanoTime() : 0L;
- boolean rmv = removex0(key, filter);
+ boolean rmv = removex0(key, CU.empty0());
if (statsEnabled && rmv)
metrics0().addRemoveTimeNanos(System.nanoTime() - start);
@@ -3002,10 +3012,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> removexAsync(K key, CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<Boolean> removexAsync(K key) {
A.notNull(key, "key");
- return removexAsync0(key, filter);
+ return removexAsync0(key, CU.empty0());
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d6ae9036/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 3fe2857..ca19446 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -623,18 +623,17 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public V remove(K key) throws IgniteCheckedException {
- return removeAsync(key, CU.empty0()).get();
+ return removeAsync(key).get();
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate[] filter) {
- return cache.removeAsync0(key, filter);
+ @Override public IgniteInternalFuture<V> removeAsync(K key) {
+ return cache.removeAsync0(key, CU.empty0());
}
/** {@inheritDoc} */
- @Override public boolean removex(K key,
- @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
- return removexAsync(key, filter).get();
+ @Override public boolean removex(K key) throws IgniteCheckedException {
+ return removexAsync(key).get();
}
/** {@inheritDoc} */
@@ -649,9 +648,8 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> removexAsync(K key,
- @Nullable CacheEntryPredicate[] filter) {
- return cache.removexAsync0(key, filter);
+ @Override public IgniteInternalFuture<Boolean> removexAsync(K key) {
+ return cache.removexAsync0(key);
}
/** {@inheritDoc} */
@@ -687,15 +685,13 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public void removeAll(@Nullable Collection<? extends K> keys,
- @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException {
- cache.removeAll(keys, filter);
+ @Override public void removeAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException {
+ cache.removeAll(keys);
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys,
- @Nullable CacheEntryPredicate[] filter) {
- return cache.removeAllAsync(keys, filter);
+ @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys) {
+ return cache.removeAllAsync(keys);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d6ae9036/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index 4615ee8..5df6964 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -1248,11 +1248,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate[] filter) {
+ @Override public IgniteInternalFuture<V> removeAsync(K key) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.removeAsync(key, filter);
+ return delegate.removeAsync(key);
}
finally {
gate.leave(prev);
@@ -1260,12 +1260,12 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public boolean removex(K key, @Nullable CacheEntryPredicate[] filter)
+ @Override public boolean removex(K key)
throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.removex(key, filter);
+ return delegate.removex(key);
}
finally {
gate.leave(prev);
@@ -1300,12 +1300,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<Boolean> removexAsync(K key,
- @Nullable CacheEntryPredicate[] filter) {
+ @Override public IgniteInternalFuture<Boolean> removexAsync(K key) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.removexAsync(key, filter);
+ return delegate.removexAsync(key);
}
finally {
gate.leave(prev);
@@ -1385,12 +1384,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public void removeAll(@Nullable Collection<? extends K> keys,
- @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
+ @Override public void removeAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- delegate.removeAll(keys, filter);
+ delegate.removeAll(keys);
}
finally {
gate.leave(prev);
@@ -1398,12 +1396,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys,
- @Nullable CacheEntryPredicate[] filter) {
+ @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.removeAllAsync(keys, filter);
+ return delegate.removeAllAsync(keys);
}
finally {
gate.leave(prev);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d6ae9036/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 026a4f6..8b4c738 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -545,7 +545,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
@Override public IgniteInternalFuture<Boolean> removeAsync(K key, V val) {
A.notNull(key, "key", val, "val");
- return removexAsync(key, ctx.equalsValArray(val));
+ return removexAsync0(key, ctx.equalsValArray(val));
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d6ae9036/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index fa7fb72..4c002d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -408,7 +408,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> removeAsync(K key, V val) {
- return removexAsync(key, ctx.equalsValArray(val));
+ return removexAsync0(key, ctx.equalsValArray(val));
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d6ae9036/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
index 70e72a2..83f646c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
@@ -199,14 +199,14 @@ public class GridAtomicCacheQueueImpl<T> extends GridCacheQueueAdapter<T> {
while (true) {
try {
- if (cache.removex(key, null))
+ if (cache.removex(key))
return;
if (stop == 0)
stop = U.currentTimeMillis() + RETRY_TIMEOUT;
while (U.currentTimeMillis() < stop ) {
- if (cache.removex(key, null))
+ if (cache.removex(key))
return;
}