ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject incubator-ignite git commit: futures: api cleanup
Date Thu, 05 Mar 2015 20:08:59 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-143 bdd6652b9 -> 2d45a4700


futures: api cleanup


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2d45a470
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2d45a470
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2d45a470

Branch: refs/heads/ignite-143
Commit: 2d45a470037931dc3f5e235e0e63db6c5e9aab7b
Parents: bdd6652
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Thu Mar 5 23:08:52 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Thu Mar 5 23:08:52 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheMvccManager.java   | 10 ----------
 .../cache/distributed/dht/GridDhtTxPrepareFuture.java     |  6 ++++--
 .../cache/distributed/near/GridNearTxPrepareFuture.java   |  8 +++++---
 .../internal/processors/service/GridServiceProcessor.java |  2 +-
 .../ignite/internal/util/future/GridCompoundFuture.java   |  7 ++++---
 5 files changed, 14 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d45a470/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
index 55bc023..9859039 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
@@ -36,7 +36,6 @@ import org.apache.ignite.lang.*;
 import org.jdk8.backport.*;
 import org.jetbrains.annotations.*;
 
-import java.io.*;
 import java.util.*;
 import java.util.concurrent.*;
 
@@ -1050,15 +1049,6 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
             new ConcurrentHashMap8<>();
 
         /**
-         * Empty constructor required for {@link Externalizable}.
-         */
-        public FinishLockFuture() {
-            assert false;
-
-            topVer = 0;
-        }
-
-        /**
          * @param topVer Topology version.
          * @param entries Entries.
          */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d45a470/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index 3429e4d..f046554 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -311,7 +311,8 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu
 
                             for (T2<EntryProcessor<K, V, ?>, Object[]> t : txEntry.entryProcessors())
{
                                 try {
-                                    CacheInvokeEntry<K, V> invokeEntry = new CacheInvokeEntry<>(txEntry.context(),
key, val);
+                                    CacheInvokeEntry<K, V> invokeEntry =
+                                        new CacheInvokeEntry<>(txEntry.context(), key,
val);
 
                                     EntryProcessor<K, V, ?> processor = t.get1();
 
@@ -486,7 +487,8 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu
 
             if (!tx.near()) {
                 if (tx.markFinalizing(IgniteInternalTx.FinalizationStatus.USER_FINISH)) {
-                    IgniteInternalFuture<IgniteInternalTx> fut = this.err.get() ==
null ? tx.commitAsync() : tx.rollbackAsync();
+                    IgniteInternalFuture<IgniteInternalTx> fut = this.err.get() ==
null ?
+                        tx.commitAsync() : tx.rollbackAsync();
 
                     fut.listen(new CIX1<IgniteInternalFuture<IgniteInternalTx>>()
{
                         @Override public void applyx(IgniteInternalFuture<IgniteInternalTx>
gridCacheTxGridFuture) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d45a470/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
index 16a74c3..cc5fcf4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
@@ -354,7 +354,7 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut
                 else {
                     topFut.listen(new CI1<IgniteInternalFuture<Long>>() {
                         @Override public void apply(IgniteInternalFuture<Long> t) {
-                            cctx.kernalContext().closure().runLocalSafe(new Runnable() {
+                            cctx.kernalContext().closure().runLocalSafe(new GridPlainRunnable()
{
                                 @Override public void run() {
                                     prepare();
                                 }
@@ -839,8 +839,10 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut
          * @param m Mapping.
          * @param mappings Queue of mappings to proceed with.
          */
-        MiniFuture(GridDistributedTxMapping<K, V> m,
-            ConcurrentLinkedDeque8<GridDistributedTxMapping<K, V>> mappings)
{
+        MiniFuture(
+            GridDistributedTxMapping<K, V> m,
+            ConcurrentLinkedDeque8<GridDistributedTxMapping<K, V>> mappings
+        ) {
             this.m = m;
             this.mappings = mappings;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d45a470/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 7e0f41e..54a2fd8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -446,7 +446,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
             futs.add(cancel(dep.configuration().getName()));
         }
 
-        return futs.isEmpty() ? new GridFinishedFuture<>() : new GridCompoundFuture(ctx,
null, futs);
+        return futs.isEmpty() ? new GridFinishedFuture<>() : new GridCompoundFuture(null,
futs);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d45a470/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
index 53eb13a..227de97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
@@ -78,12 +78,13 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R>
{
     }
 
     /**
-     * @param ctx Context.
      * @param rdc Reducer to add.
      * @param futs Futures to add.
      */
-    public GridCompoundFuture(GridKernalContext ctx, @Nullable IgniteReducer<T, R>
rdc,
-        @Nullable Iterable<IgniteInternalFuture<T>> futs) {
+    public GridCompoundFuture(
+        @Nullable IgniteReducer<T, R> rdc,
+        @Nullable Iterable<IgniteInternalFuture<T>> futs
+    ) {
         this.rdc = rdc;
 
         addAll(futs);


Mime
View raw message