JAL-1173 - trap redraw buffer OOM errors. needs a test case - since the dialog doesn...
[jalview.git] / src / jalview / api / AlignCalcManagerI.java
index a7b17c6..e2982c1 100644 (file)
@@ -1,9 +1,9 @@
 package jalview.api;
 
-import java.util.List;
-
 import jalview.datamodel.AlignmentAnnotation;
 
+import java.util.List;
+
 public interface AlignCalcManagerI
 {
 
@@ -105,4 +105,20 @@ public interface AlignCalcManagerI
    */
   boolean startRegisteredWorkersOfClass(Class workerClass);
 
+  /**
+   * work out if there is an instance of a worker that is *waiting* to start
+   * calculating
+   *
+   * @param workingClass
+   * @return true if workingClass is already waiting to calculate. false if it
+   *         is calculating, or not queued.
+   */
+  boolean isPending(AlignCalcWorkerI workingClass);
+
+  /**
+   * deregister and otherwise remove any registered and working instances of the given worker type
+   * @param typeToRemove
+   */
+  void removeRegisteredWorkersOfClass(Class typeToRemove);
+
 }