brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [04/21] incubator-brooklyn git commit: Delete deprecated TaskQueuingContext.last
Date Sat, 01 Aug 2015 15:45:57 GMT
Delete deprecated TaskQueuingContext.last


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

Branch: refs/heads/master
Commit: fa9450ed4bbc4bff919fa68dec0b1d7995830c2d
Parents: f49ca1b
Author: Aled Sage <aled.sage@gmail.com>
Authored: Tue Jul 28 22:53:49 2015 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Sat Aug 1 00:13:31 2015 +0100

----------------------------------------------------------------------
 .../java/brooklyn/management/TaskQueueingContext.java     |  5 -----
 .../main/java/brooklyn/entity/effector/EffectorBody.java  | 10 ----------
 .../java/brooklyn/util/task/DynamicSequentialTask.java    |  7 -------
 3 files changed, 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/fa9450ed/api/src/main/java/brooklyn/management/TaskQueueingContext.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/brooklyn/management/TaskQueueingContext.java b/api/src/main/java/brooklyn/management/TaskQueueingContext.java
index db96fcd..65faea4 100644
--- a/api/src/main/java/brooklyn/management/TaskQueueingContext.java
+++ b/api/src/main/java/brooklyn/management/TaskQueueingContext.java
@@ -43,11 +43,6 @@ public interface TaskQueueingContext {
     /** returns a list of queued tasks (immutable copy) */
     public List<Task<?>> getQueue();
 
-    /** returns the last task in the queue, or null if none 
-     * @deprecated since 0.7.0 this method is misleading if the caller attempts to block
on the task and the queue aborts */
-    @Deprecated
-    public Task<?> last();
-
     /** Drains the task queue for this context to complete, ie waits for this context to
complete (or terminate early)
      * @param optionalTimeout null to run forever
      * @param includePrimaryThread whether the parent (this context) should also be joined
on;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/fa9450ed/core/src/main/java/brooklyn/entity/effector/EffectorBody.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/effector/EffectorBody.java b/core/src/main/java/brooklyn/entity/effector/EffectorBody.java
index ca62e48..72d4a58 100644
--- a/core/src/main/java/brooklyn/entity/effector/EffectorBody.java
+++ b/core/src/main/java/brooklyn/entity/effector/EffectorBody.java
@@ -82,16 +82,6 @@ public abstract class EffectorBody<T> {
         return DynamicTasks.queue(task.newTask());
     }
     
-    /** Returns the last task queued in this context, or null if none. 
-     * Does not block, and there is no guarantee the task is submitted
-     * or even that it will be submitted (if the queue aborts early). 
-     * @deprecated since 0.7.0 not needed, and misleading given {@link #last(Class)},
-     * and the prospect that the task will never complete if there are errors */
-    @Deprecated
-    protected Task<?> last() {
-        return DynamicTasks.getTaskQueuingContext().last();
-    }
-
     /** see {@link DynamicTasks#waitForLast()} */
     protected Task<?> waitForLast() {
         return DynamicTasks.waitForLast();

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/fa9450ed/core/src/main/java/brooklyn/util/task/DynamicSequentialTask.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/util/task/DynamicSequentialTask.java b/core/src/main/java/brooklyn/util/task/DynamicSequentialTask.java
index 7756388..b4ae488 100644
--- a/core/src/main/java/brooklyn/util/task/DynamicSequentialTask.java
+++ b/core/src/main/java/brooklyn/util/task/DynamicSequentialTask.java
@@ -461,13 +461,6 @@ public class DynamicSequentialTask<T> extends BasicTask<T>
implements HasTaskChi
         throw Exceptions.propagate(throwable);
     }
 
-    @Override @Deprecated
-    public Task<?> last() {
-        List<Task<?>> l = getQueue();
-        if (l.isEmpty()) return null;
-        return l.get(l.size()-1);
-    }
-
     @Override
     public void drain(Duration optionalTimeout, boolean includePrimary, boolean throwFirstError)
{
         try {


Mime
View raw message