X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fapi%2FAlignCalcManagerI.java;h=9c7f9ab552ecaf223e5394736438e8593403589d;hb=7596cd64543481df859a9bd2e73a3b3bb6b2e42c;hp=7d73b12354129fd3aca443f4dcd26d1fae118f74;hpb=ab43013b7e357b84b4abade0dba949668dfb2a0e;p=jalview.git diff --git a/src/jalview/api/AlignCalcManagerI.java b/src/jalview/api/AlignCalcManagerI.java index 7d73b12..9c7f9ab 100644 --- a/src/jalview/api/AlignCalcManagerI.java +++ b/src/jalview/api/AlignCalcManagerI.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -35,14 +35,6 @@ public interface AlignCalcManagerI void notifyStart(AlignCalcWorkerI worker); /** - * check if a calculation of this type is already active - * - * @param worker - * @return - */ - boolean alreadyDoing(AlignCalcWorkerI worker); - - /** * tell manager that worker is now processing data * * @param worker @@ -63,7 +55,7 @@ public interface AlignCalcManagerI * * @param worker */ - void workerCannotRun(AlignCalcWorkerI worker); + void disableWorker(AlignCalcWorkerI worker); /** * indicate that a worker like this may be run on the platform. @@ -71,7 +63,15 @@ public interface AlignCalcManagerI * @param worker * of class to be removed from the execution blacklist */ - void workerMayRun(AlignCalcWorkerI worker); + void enableWorker(AlignCalcWorkerI worker); + + /** + * Answers true if the worker is disabled from running + * + * @param worker + * @return + */ + boolean isDisabled(AlignCalcWorkerI worker); /** * launch a new worker @@ -120,7 +120,7 @@ public interface AlignCalcManagerI * * @param workerClass */ - void updateAnnotationFor(Class workerClass); + void updateAnnotationFor(Class workerClass); /** * return any registered workers of the given class @@ -128,17 +128,8 @@ public interface AlignCalcManagerI * @param workerClass * @return null or one or more workers of the given class */ - List 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); + List getRegisteredWorkersOfClass( + Class workerClass); /** * work out if there is an instance of a worker that is *waiting* to start @@ -156,6 +147,15 @@ public interface AlignCalcManagerI * * @param typeToRemove */ - void removeRegisteredWorkersOfClass(Class typeToRemove); + void removeRegisteredWorkersOfClass( + Class typeToRemove); + /** + * Removes the worker that produces the given annotation, provided it is + * marked as 'deletable'. Some workers may need to continue to run as the + * results of their calculations are needed, e.g. for colour schemes. + * + * @param ann + */ + void removeWorkerForAnnotation(AlignmentAnnotation ann); }