ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [37/50] [abbrv] incubator-ignite git commit: IGNITE-542 - Removed 'extends Future' from IgniteFuture
Date Sun, 22 Mar 2015 19:46:34 GMT
IGNITE-542 - Removed 'extends Future' from IgniteFuture


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

Branch: refs/heads/ignite-379-1
Commit: deaad898cd11805deb24e13d54da94529b53eccd
Parents: 38fadda
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Fri Mar 20 12:59:26 2015 -0700
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Fri Mar 20 12:59:26 2015 -0700

----------------------------------------------------------------------
 .../internal/util/future/IgniteFutureImpl.java  |  5 ----
 .../org/apache/ignite/lang/IgniteFuture.java    | 30 ++++++++++++++++----
 .../processors/schedule/ScheduleFutureImpl.java | 11 -------
 3 files changed, 25 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deaad898/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
index ba3881f..86ad438 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
@@ -105,11 +105,6 @@ public class IgniteFutureImpl<V> implements IgniteFuture<V>
{
     }
 
     /** {@inheritDoc} */
-    @Override public boolean cancel(boolean mayInterruptIfRunning) {
-        return mayInterruptIfRunning && cancel();
-    }
-
-    /** {@inheritDoc} */
     @Override public V get() {
         try {
             return fut.get();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deaad898/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java b/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
index 6941426..f9549b9 100644
--- a/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteFuture.java
@@ -22,12 +22,13 @@ import org.apache.ignite.*;
 import java.util.concurrent.*;
 
 /**
- * Extension for standard {@link Future} interface. It adds simplified exception handling,
- * functional programming support and ability to listen for future completion via functional
+ * Future with simplified exception handling, functional programming support
+ * and ability to listen for future completion via functional
  * callback.
+ *
  * @param <V> Type of the result for the future.
  */
-public interface IgniteFuture<V> extends Future<V> {
+public interface IgniteFuture<V> {
     /**
      * Synchronously waits for completion of the computation and
      * returns computation result.
@@ -37,7 +38,7 @@ public interface IgniteFuture<V> extends Future<V> {
      * @throws IgniteFutureCancelledException Subclass of {@link IgniteException} thrown
if computation was cancelled.
      * @throws IgniteException If computation failed.
      */
-    @Override public V get() throws IgniteException;
+    public V get() throws IgniteException;
 
     /**
      * Synchronously waits for completion of the computation for
@@ -65,7 +66,7 @@ public interface IgniteFuture<V> extends Future<V> {
      * @throws IgniteFutureTimeoutException Subclass of {@link IgniteException} thrown if
the wait was timed out.
      * @throws IgniteException If computation failed.
      */
-    @Override public V get(long timeout, TimeUnit unit) throws IgniteException;
+    public V get(long timeout, TimeUnit unit) throws IgniteException;
 
     /**
      * Cancels this future.
@@ -76,6 +77,25 @@ public interface IgniteFuture<V> extends Future<V> {
     public boolean cancel() throws IgniteException;
 
     /**
+     * Returns {@code true} if this task was cancelled before it completed
+     * normally.
+     *
+     * @return {@code true} if this task was cancelled before it completed
+     */
+    boolean isCancelled();
+
+    /**
+     * Returns {@code true} if this task completed.
+     * <p>
+     * Completion may be due to normal termination, an exception, or
+     * cancellation - in all of these cases, this method will return
+     * {@code true}.
+     *
+     * @return {@code true} if this task completed.
+     */
+    boolean isDone();
+
+    /**
      * Gets start time for this future.
      *
      * @return Start time for this future.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/deaad898/modules/schedule/src/main/java/org/apache/ignite/internal/processors/schedule/ScheduleFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/schedule/src/main/java/org/apache/ignite/internal/processors/schedule/ScheduleFutureImpl.java
b/modules/schedule/src/main/java/org/apache/ignite/internal/processors/schedule/ScheduleFutureImpl.java
index 7c1aedd..6689587 100644
--- a/modules/schedule/src/main/java/org/apache/ignite/internal/processors/schedule/ScheduleFutureImpl.java
+++ b/modules/schedule/src/main/java/org/apache/ignite/internal/processors/schedule/ScheduleFutureImpl.java
@@ -438,12 +438,6 @@ class ScheduleFutureImpl<R> implements SchedulerFuture<R>
{
     }
 
     /** {@inheritDoc} */
-    @Override public boolean cancel(boolean mayInterruptIfRunning) {
-        return mayInterruptIfRunning && cancel();
-
-    }
-
-    /** {@inheritDoc} */
     @Override public boolean cancel() {
         synchronized (mux) {
             if (done)
@@ -846,11 +840,6 @@ class ScheduleFutureImpl<R> implements SchedulerFuture<R>
{
         }
 
         /** {@inheritDoc} */
-        @Override public boolean cancel(boolean mayInterruptIfRunning) {
-            return ref.cancel(mayInterruptIfRunning);
-        }
-
-        /** {@inheritDoc} */
         @Override public boolean cancel() {
             return ref.cancel();
         }


Mime
View raw message