incubator-droids-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r1458242 - in /incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core: AbstractDroid.java Droid.java
Date Tue, 19 Mar 2013 12:24:58 GMT
Author: thorsten
Date: Tue Mar 19 12:24:58 2013
New Revision: 1458242

URL: http://svn.apache.org/r1458242
Log:
Adding pause and clear queue if stopped

Modified:
    incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core/AbstractDroid.java
    incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core/Droid.java

Modified: incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core/AbstractDroid.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core/AbstractDroid.java?rev=1458242&r1=1458241&r2=1458242&view=diff
==============================================================================
--- incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core/AbstractDroid.java
(original)
+++ incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core/AbstractDroid.java
Tue Mar 19 12:24:58 2013
@@ -120,11 +120,17 @@ public abstract class AbstractDroid<T ex
     }
 
     @Override
-    public void stop() {
+    public void pause() {
         taskMaster.stop();
     }
 
     @Override
+    public void stop() {
+        pause();
+        queue.clear();
+    }
+
+    @Override
     public void finished() {
         logger.info("FINISHED!!!");
     }

Modified: incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core/Droid.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core/Droid.java?rev=1458242&r1=1458241&r2=1458242&view=diff
==============================================================================
--- incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core/Droid.java
(original)
+++ incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/core/Droid.java
Tue Mar 19 12:24:58 2013
@@ -37,7 +37,12 @@ public interface Droid<T extends Task> {
     public void start() throws DroidsException;
 
     /**
-     * Stop the droid which will then stop the taskmaster 
+     * Pause the droid, will stop the taskmaster but not alter the queue.
+     */
+    void pause();
+
+    /**
+     * Stop the droid which will then stop the taskmaster and clear the queue
      */
     public void stop();
 
@@ -95,4 +100,5 @@ public interface Droid<T extends Task> {
      * @return the task or null, if the task is not valid
      */
     public T filter(T task);
+
 }



Mime
View raw message