// Cache for Limits information\r
private LimitsManager<T> limits;\r
\r
- protected String inputFile = "input.txt";\r
- protected String outputFile = "output.txt";\r
- protected String errorFile = "error.txt";\r
+ public static final String INPUT = "input.txt";\r
+ public static final String OUTPUT = "result.txt";\r
+ public static final String ERROR = "error.txt";\r
+\r
+ protected String inputFile = INPUT;\r
+ protected String outputFile = OUTPUT;\r
+ protected String errorFile = ERROR;\r
\r
private boolean isInputSet = false;\r
private boolean isOutputSet = false;\r
return code;\r
}\r
\r
- public String getClusterSettings() {\r
+ @Override\r
+ public String getClusterJobSettings() {\r
String settings = ph.getProperty(getType().getSimpleName()\r
.toLowerCase() + ".cluster.settings");\r
return settings == null ? "" : settings;\r
}\r
\r
@Override\r
- public Limit<T> getLimit(String presetName) {\r
-\r
+ public synchronized Limit<T> getLimit(String presetName) {\r
+ // Assume this function is called for the first time and thus need\r
+ // initialization\r
if (limits == null) {\r
limits = getLimits();\r
}\r
+ // Either the initialization failed or limits were not configured.\r
+ if (limits == null) {\r
+ return null;\r
+ }\r
\r
Limit<T> limit = null;\r
if (limits != null) {\r
public LimitsManager<T> getLimits() {\r
synchronized (SkeletalExecutable.class) {\r
if (limits == null) {\r
- limits = compbio.runner.Util.getLimits(this.getType());\r
+ limits = compbio.engine.client.Util.getLimits(this.getType());\r
}\r
}\r
return limits;\r
* \r
* @return subclasses must return their type\r
*/\r
- public abstract Class<Executable<T>> getType();\r
+ public abstract Class<T> getType();\r
\r
}\r