package jalview.api;
+import java.util.List;
+
+import jalview.datamodel.AlignmentAnnotation;
+
public interface AlignCalcManagerI
{
void workerCannotRun(AlignCalcWorkerI worker);
/**
+ * indicate that a worker like this may be run on the platform.
+ * @param worker of class to be removed from the execution blacklist
+ */
+ void workerMayRun(AlignCalcWorkerI worker);
+ /**
* launch a new worker
* @param worker
*/
*/
boolean isWorking();
+
+ /**
+ * register a restartable worker
+ * @param worker
+ */
+ void registerWorker(AlignCalcWorkerI worker);
+
+ /**
+ * restart any registered workers
+ */
+ void restartWorkers();
+
+ /**
+ *
+ * @param alignmentAnnotation
+ * @return true if a currently registered and working worker indicates its involvement with the given alignmentAnnotation
+ */
+ boolean workingInvolvedWith(AlignmentAnnotation alignmentAnnotation);
+
+ /**
+ * kick any known instances of the given worker class to update their annotation
+ * @param workerClass
+ */
+ void updateAnnotationFor(Class workerClass);
+
+ /**
+ * return any registered workers of the given class
+ * @param workerClass
+ * @return null or one or more workers of the given class
+ */
+ List<AlignCalcWorkerI> getRegisteredWorkersOfClass(
+ Class workerClass);
+
+ /**
+ * start any workers of the given class
+ * @param workerClass
+ * @return false if no workers of given class were registered
+ * (note - blacklisted classes cannot be restarted, so this method will return true for blacklisted workers)
+ */
+ boolean startRegisteredWorkersOfClass(Class workerClass);
+
}