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/08 18:24:14 UTC
[2/2] incubator-ignite git commit: #ignite-683: Delete unused
parameters from putxAsync.
#ignite-683: Delete unused parameters from putxAsync.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e9d91244
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e9d91244
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e9d91244
Branch: refs/heads/ignite-683
Commit: e9d912442a23e771475ca5b80f5ce628a40f7d24
Parents: 730d3fc
Author: ivasilinets <iv...@gridgain.com>
Authored: Wed Apr 8 19:23:59 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Wed Apr 8 19:23:59 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 28 ++++++++------------
.../cache/GridCacheProjectionImpl.java | 4 +--
.../dht/atomic/GridDhtAtomicCache.java | 11 +++-----
.../distributed/near/GridNearAtomicCache.java | 19 +++++--------
.../local/atomic/GridLocalAtomicCache.java | 13 +++------
5 files changed, 26 insertions(+), 49 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e9d91244/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 f1f660e..b00fba9 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
@@ -2435,7 +2435,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, filter);
+ IgniteInternalFuture<Boolean> fut = putxAsync0(key, val, filter);
if (statsEnabled)
fut.listen(new UpdatePutTimeStatClosure<Boolean>(metrics0(), start));
@@ -2448,13 +2448,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 filter Optional filter.
* @return Putx operation future.
*/
- public IgniteInternalFuture<Boolean> putxAsync(final K key, final V val,
- @Nullable final GridCacheEntryEx entry,
- @Nullable final CacheEntryPredicate... filter) {
+ public IgniteInternalFuture<Boolean> putxAsync0(final K key, final V val,
+ @Nullable final CacheEntryPredicate... filter) {
A.notNull(key, "key", val, "val");
if (keyCheck)
@@ -2464,7 +2462,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, filter).chain(
+ return tx.putAllAsync(ctx, F.t(key, val), false, null, filter).chain(
(IgniteClosure<IgniteInternalFuture<GridCacheReturn>, Boolean>) RET2FLAG);
}
@@ -2964,7 +2962,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
long start = statsEnabled ? System.nanoTime() : 0L;
- boolean rmv = removex(key, null, null);
+ boolean rmv = removex0(key, null, null);
if (statsEnabled && rmv)
metrics0().addRemoveTimeNanos(System.nanoTime() - start);
@@ -2976,13 +2974,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 removex(final K key, @Nullable final GridCacheEntryEx entry,
- @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
+ public boolean removex0(final K key, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
long start = statsEnabled ? System.nanoTime() : 0L;
@@ -2994,7 +2990,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() {
@@ -3012,7 +3008,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
@Override public IgniteInternalFuture<Boolean> removexAsync(K key) {
A.notNull(key, "key");
- return removexAsync(key, null, CU.empty0());
+ return removexAsync0(key, CU.empty0());
}
@@ -3039,19 +3035,17 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
public IgniteInternalFuture<Boolean> removexAsync(K key, CacheEntryPredicate... filter) {
A.notNull(key, "key");
- return removexAsync(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> removexAsync(final K key, @Nullable final GridCacheEntryEx entry,
- @Nullable final CacheEntryPredicate... filter) {
+ public IgniteInternalFuture<Boolean> removexAsync0(final K key, @Nullable final CacheEntryPredicate... filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
final long start = statsEnabled ? System.nanoTime() : 0L;
@@ -3063,7 +3057,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/e9d91244/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 8e59ca8..acc5224 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
@@ -430,7 +430,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> putxIfAbsentAsync(K key, V val) {
- return cache.putxAsync(key, val, null, cctx.noValArray());
+ return cache.putxAsync(key, val, cctx.noValArray());
}
/** {@inheritDoc} */
@@ -450,7 +450,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public IgniteInternalFuture<Boolean> replacexAsync(K key, V val) {
- return cache.putxAsync(key, val, null, cctx.hasValArray());
+ return cache.putxAsync(key, val, cctx.hasValArray());
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e9d91244/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 ebb7622..a4f4fd7 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
@@ -329,8 +329,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> putxAsync(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),
@@ -516,15 +515,13 @@ 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 CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return removexAsync(key, 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 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/e9d91244/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 f66b65c..595f1ca 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
@@ -411,11 +411,8 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> putxAsync(K key,
- V val,
- @Nullable GridCacheEntryEx entry,
- @Nullable CacheEntryPredicate... filter) {
- return dht.putxAsync(key, val, entry, filter);
+ @Override public IgniteInternalFuture<Boolean> putxAsync0(K key, V val, @Nullable CacheEntryPredicate... filter) {
+ return dht.putxAsync0(key, val, filter);
}
/** {@inheritDoc} */
@@ -577,18 +574,14 @@ 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 CacheEntryPredicate... filter) throws IgniteCheckedException {
+ return dht.removex0(key, 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 CacheEntryPredicate... filter) {
+ return dht.removexAsync0(key, filter);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e9d91244/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 623024d..c35d2af 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
@@ -153,10 +153,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public IgniteInternalFuture<Boolean> putxAsync(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", val, "val");
return updateAllAsync0(F0.asMap(key, val),
@@ -338,9 +335,7 @@ 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 CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
long start = statsEnabled ? System.nanoTime() : 0L;
@@ -365,9 +360,7 @@ 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 CacheEntryPredicate... filter) {
A.notNull(key, "key");
return removeAllAsync0(Collections.singletonList(key), false, false, filter);