You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2017/04/11 11:12:39 UTC

[1/2] brooklyn-server git commit: BROOKLYN-446: deprecate broken ScheduledTask constructors

Repository: brooklyn-server
Updated Branches:
  refs/heads/master 955754019 -> 5b24a9f4e


BROOKLYN-446: deprecate broken ScheduledTask constructors

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

Branch: refs/heads/master
Commit: a3520eb82a5737989a3927fd7b22627088810e8d
Parents: 9557540
Author: Aled Sage <al...@gmail.com>
Authored: Tue Apr 11 10:55:41 2017 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Tue Apr 11 10:55:41 2017 +0100

----------------------------------------------------------------------
 .../apache/brooklyn/util/core/task/ScheduledTask.java | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a3520eb8/core/src/main/java/org/apache/brooklyn/util/core/task/ScheduledTask.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/util/core/task/ScheduledTask.java b/core/src/main/java/org/apache/brooklyn/util/core/task/ScheduledTask.java
index c16ce3b..c253916 100644
--- a/core/src/main/java/org/apache/brooklyn/util/core/task/ScheduledTask.java
+++ b/core/src/main/java/org/apache/brooklyn/util/core/task/ScheduledTask.java
@@ -80,10 +80,24 @@ public class ScheduledTask extends BasicTask<Object> {
         this(MutableMap.of(), taskFactory);
     }
 
+    /**
+     * @deprecated since 0.11.0; instead use {@link #ScheduledTask(Callable)}.
+     * @see {@link #ScheduledTask(Map, Task)}
+     */
+    @Deprecated
     public ScheduledTask(final Task<?> task) {
         this(MutableMap.of(), task);
     }
 
+    /**
+     * @deprecated since 0.11.0; instead use {@link #ScheduledTask(Map, Callable)}. If using this method,
+     *             the task will be executed only once (ignoring any additional config such as "period").
+     *             This is because the task object is reused for the second execution, but it is
+     *             already "done" so does not re-execute.
+     * 
+     * @see {@link https://issues.apache.org/jira/browse/BROOKLYN-446}
+     */
+    @Deprecated
     public ScheduledTask(Map<?,?> flags, final Task<?> task){
         this(flags, new Callable<Task<?>>(){
             @Override


[2/2] brooklyn-server git commit: Closes #627

Posted by sv...@apache.org.
Closes #627

BROOKLYN-446: deprecate broken ScheduledTask constructors

See https://issues.apache.org/jira/browse/BROOKLYN-446


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

Branch: refs/heads/master
Commit: 5b24a9f4ec48b1bea84ac73c769a82334731ff30
Parents: 9557540 a3520eb
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Tue Apr 11 14:12:28 2017 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Tue Apr 11 14:12:28 2017 +0300

----------------------------------------------------------------------
 .../apache/brooklyn/util/core/task/ScheduledTask.java | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------