ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [05/50] [abbrv] incubator-ignite git commit: ignite-65 review
Date Tue, 27 Jan 2015 10:56:57 GMT
ignite-65 review


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

Branch: refs/heads/ignite-99-2
Commit: 714cb9ba620d1d0c97a6fee9cfd532eaa6824617
Parents: 848380c
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Thu Jan 22 18:40:38 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Thu Jan 22 18:40:38 2015 +0300

----------------------------------------------------------------------
 .../closure/GridClosureProcessor.java           | 27 +++++++++-----
 .../GridMasterLeaveAwareComputeJobAdapter.java  | 37 --------------------
 .../MasterLeaveAwareComputeJobAdapter.java      | 33 +++++++++++++++++
 3 files changed, 52 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/714cb9ba/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessor.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessor.java
index 2a6deda..a3fd599 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridClosureProcessor.java
@@ -30,6 +30,7 @@ import org.gridgain.grid.kernal.processors.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.future.*;
 import org.gridgain.grid.util.lang.*;
+import org.gridgain.grid.util.tostring.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.grid.util.worker.*;
@@ -1022,7 +1023,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
         A.notNull(c, "job");
 
         if (c instanceof ComputeJobMasterLeaveAware)
-            return new C3<>(c,cacheName,affKey);
+            return new C3<>(c, cacheName, affKey);
         else {
             return new ComputeJobAdapter() {
                 /** */
@@ -1669,8 +1670,9 @@ public class GridClosureProcessor extends GridProcessorAdapter {
     }
 
     /**
+     *
      */
-    private static class C1<T, R> extends GridMasterLeaveAwareComputeJobAdapter {
+    private static class C1<T, R> extends MasterLeaveAwareComputeJobAdapter {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -1678,15 +1680,18 @@ public class GridClosureProcessor extends GridProcessorAdapter {
         private IgniteClosure<T, R> job;
 
         /** */
+        @GridToStringInclude
         private T arg;
 
         /**
+         *
          */
         public C1(){
             // No-op.
         }
 
         /**
+         *
          */
         public C1(IgniteClosure<T, R> job, T arg) {
             this.job = job;
@@ -1711,14 +1716,20 @@ public class GridClosureProcessor extends GridProcessorAdapter {
 
         /** {@inheritDoc} */
         @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
-            job = (IgniteClosure<T, R>) in.readObject();
-            arg = (T) in.readObject();
+            job = (IgniteClosure<T, R>)in.readObject();
+            arg = (T)in.readObject();
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return S.toString(C1.class, this);
         }
     }
 
     /**
+     *
      */
-    private static class C2<R> extends GridMasterLeaveAwareComputeJobAdapter {
+    private static class C2<R> extends MasterLeaveAwareComputeJobAdapter {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -1765,7 +1776,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
 
     /**
      */
-    private static class C3<R> extends GridMasterLeaveAwareComputeJobAdapter {
+    private static class C3<R> extends MasterLeaveAwareComputeJobAdapter {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -1827,7 +1838,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
 
     /**
      */
-    private static class C4 extends GridMasterLeaveAwareComputeJobAdapter {
+    private static class C4 extends MasterLeaveAwareComputeJobAdapter {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -1871,7 +1882,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
 
     /**
      */
-    private static class C5 extends GridMasterLeaveAwareComputeJobAdapter {
+    private static class C5 extends MasterLeaveAwareComputeJobAdapter {
         /** */
         private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/714cb9ba/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridMasterLeaveAwareComputeJobAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridMasterLeaveAwareComputeJobAdapter.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridMasterLeaveAwareComputeJobAdapter.java
deleted file mode 100644
index 005c3ad..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/GridMasterLeaveAwareComputeJobAdapter.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gridgain.grid.kernal.processors.closure;
-
-import org.apache.ignite.compute.*;
-
-import java.io.Externalizable;
-
-/**
- * Job adapter implementing {@link org.apache.ignite.compute.ComputeJobMasterLeaveAware}.
- */
-public abstract class GridMasterLeaveAwareComputeJobAdapter extends ComputeJobAdapter implements
Externalizable, ComputeJobMasterLeaveAware {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /**
-     * No-arg constructor.
-     */
-    protected GridMasterLeaveAwareComputeJobAdapter() {
-        // No-op.
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/714cb9ba/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/MasterLeaveAwareComputeJobAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/MasterLeaveAwareComputeJobAdapter.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/MasterLeaveAwareComputeJobAdapter.java
new file mode 100644
index 0000000..2374dd6
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/closure/MasterLeaveAwareComputeJobAdapter.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gridgain.grid.kernal.processors.closure;
+
+import org.apache.ignite.compute.*;
+
+import java.io.Externalizable;
+
+/**
+ * Job adapter implementing {@link org.apache.ignite.compute.ComputeJobMasterLeaveAware}.
+ */
+public abstract class MasterLeaveAwareComputeJobAdapter
+    implements ComputeJob, ComputeJobMasterLeaveAware, Externalizable {
+    /** {@inheritDoc} */
+    @Override public void cancel() {
+        // No-op.
+    }
+}


Mime
View raw message