X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=engine%2Fcompbio%2Fengine%2Fclient%2FSkeletalExecutable.java;h=369f8e71adb0eb58155d028151c4352bcad94593;hb=c7c5df620d816bf197c48f059a9ed3300fdf277a;hp=b289f6c32530197cd7598310cde85e6b90d9e0d4;hpb=2a269830633463e5016d5c92ed672d9e312c9776;p=jabaws.git diff --git a/engine/compbio/engine/client/SkeletalExecutable.java b/engine/compbio/engine/client/SkeletalExecutable.java index b289f6c..369f8e7 100644 --- a/engine/compbio/engine/client/SkeletalExecutable.java +++ b/engine/compbio/engine/client/SkeletalExecutable.java @@ -42,9 +42,13 @@ public abstract class SkeletalExecutable implements Executable { // Cache for Limits information private LimitsManager limits; - protected String inputFile = "input.txt"; - protected String outputFile = "output.txt"; - protected String errorFile = "error.txt"; + public static final String INPUT = "input.txt"; + public static final String OUTPUT = "result.txt"; + public static final String ERROR = "error.txt"; + + protected String inputFile = INPUT; + protected String outputFile = OUTPUT; + protected String errorFile = ERROR; private boolean isInputSet = false; private boolean isOutputSet = false; @@ -257,7 +261,8 @@ public abstract class SkeletalExecutable implements Executable { return code; } - public String getClusterSettings() { + @Override + public String getClusterJobSettings() { String settings = ph.getProperty(getType().getSimpleName() .toLowerCase() + ".cluster.settings"); return settings == null ? "" : settings; @@ -293,11 +298,16 @@ public abstract class SkeletalExecutable implements Executable { } @Override - public Limit getLimit(String presetName) { - + public synchronized Limit getLimit(String presetName) { + // Assume this function is called for the first time and thus need + // initialization if (limits == null) { limits = getLimits(); } + // Either the initialization failed or limits were not configured. + if (limits == null) { + return null; + } Limit limit = null; if (limits != null) { @@ -318,7 +328,7 @@ public abstract class SkeletalExecutable implements Executable { public LimitsManager getLimits() { synchronized (SkeletalExecutable.class) { if (limits == null) { - limits = compbio.runner.Util.getLimits(this.getType()); + limits = compbio.engine.client.Util.getLimits(this.getType()); } } return limits; @@ -328,6 +338,6 @@ public abstract class SkeletalExecutable implements Executable { * * @return subclasses must return their type */ - public abstract Class> getType(); + public abstract Class getType(); }