* {@ink Class#equals(Object)} rather than {@code instanceof}.
*/
List<AlignCalcWorkerI> getWorkersOfClass(Class<? extends AlignCalcWorkerI> cls);
-
+
+ /**
+ * Returns the list of all workers for the given name or an empty list
+ * if there are none.
+ */
+ List<AlignCalcWorkerI> getWorkersForName(String name);
+
/**
* Removes the worker from the scheduler. It does not cancel workers
* already scheduled for execution.
void removeWorkerForAnnotation(AlignmentAnnotation annot);
/**
+ * Alias of removeWorkerForAnnotation
+ */
+ default void removeWorkersForAnnotation(AlignmentAnnotation annot) {
+ removeWorkerForAnnotation(annot);
+ }
+
+ /**
+ * Removes all workers with matching name.
+ */
+ void removeWorkersForName(String name);
+
+ /**
* Removes all workers of a given class. The classes are compared using
* {@link Class#equals(Object)}.
*/
* Remove previously registered worker listener.
*/
void removeAlignCalcListener(AlignCalcListener listener);
+
+ /**
+ * Stops the manager from running new jobs and cleans-up all
+ * resources such as threads and thread pools.
+ */
+ void shutdown();
}