Removed wrong constructor

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor-api@119892 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-10-20 13:01:04 +00:00
parent a754cb9719
commit d1c42241a8
2 changed files with 31 additions and 18 deletions

View File

@ -22,56 +22,69 @@ import org.gcube.vremanagement.executor.utils.MapCompare;
public class LaunchParameter implements Comparable<LaunchParameter>{
@XmlElement
/**
* The name of the plugin to launch
*/
protected String pluginName;
@XmlJavaTypeAdapter(MapAdapter.class)
/**
* The plugin capabilities which has to be satisfied to launch the
* plugin instance execution. The SmartExectuor Service check that this
* capabilities match the capabilities declared from the discovered plugin.
* If the capabilities does not match the service will not launch the
* execution.
*/
protected Map<String, String> pluginCapabilities;
@XmlJavaTypeAdapter(MapAdapter.class)
/**
* Inputs to provide to the plugin instance which have to be executed.
*/
protected Map<String, Object> inputs;
@XmlElement
/**
* Scheduling parameters. See {#Scheduling} fro futher details
*/
protected Scheduling scheduling;
@XmlElement
/**
* Used only for scheduled tasks. Indicate if the task has to be persisted
* so that if the SmartExectuor Service instance die, another one take in
* charge that execution.
*/
protected boolean persist;
protected LaunchParameter(){}
public LaunchParameter(String pluginName, Map<String, Object> inputs) {
this(pluginName, null, inputs, false, null);
this(pluginName, null, inputs, null, false);
}
public LaunchParameter(String pluginName, Map<String, String> pluginCapabilities, Map<String, Object> inputs) {
this(pluginName, pluginCapabilities, inputs, false, null);
}
public LaunchParameter(String pluginName, Map<String, Object> inputs, boolean persist) {
this(pluginName, null, inputs, persist, null);
}
public LaunchParameter(String pluginName, Map<String, String> pluginCapabilities, Map<String, Object> inputs, boolean persist) {
this(pluginName, pluginCapabilities, inputs, persist, null);
this(pluginName, pluginCapabilities, inputs, null, false);
}
public LaunchParameter(String pluginName, Map<String, Object> inputs, Scheduling scheduling) {
this(pluginName, null, inputs, false, scheduling);
this(pluginName, null, inputs, scheduling, false);
}
public LaunchParameter(String pluginName, Map<String, String> pluginCapabilities, Map<String, Object> inputs, Scheduling scheduling) {
this(pluginName, pluginCapabilities, inputs, false, scheduling);
this(pluginName, pluginCapabilities, inputs, scheduling, false);
}
public LaunchParameter(String pluginName, Map<String, Object> inputs, boolean persist, Scheduling scheduling) {
this(pluginName, null, inputs, persist, scheduling);
public LaunchParameter(String pluginName, Map<String, Object> inputs, Scheduling scheduling, boolean persist) {
this(pluginName, null, inputs, scheduling, persist);
}
public LaunchParameter(String pluginName, Map<String, String> pluginCapabilities, Map<String, Object> inputs, boolean persist, Scheduling scheduling) {
public LaunchParameter(String pluginName, Map<String, String> pluginCapabilities, Map<String, Object> inputs, Scheduling scheduling, boolean persist) {
this.pluginName = pluginName;
this.pluginCapabilities = pluginCapabilities;
this.inputs = inputs;
this.persist = persist;
this.scheduling = scheduling;
this.persist = persist;
}
/**
@ -103,6 +116,7 @@ public class LaunchParameter implements Comparable<LaunchParameter>{
this.pluginCapabilities = pluginCapabilities;
}
/**
* @return the inputs
*/
@ -151,7 +165,6 @@ public class LaunchParameter implements Comparable<LaunchParameter>{
public int compareTo(LaunchParameter launchParameter) {
int compareResult = 0;
compareResult = (new Boolean(persist)).compareTo(new Boolean(launchParameter.persist));
if(compareResult!=0){
return compareResult;

View File

@ -42,7 +42,7 @@ public class LaunchParameterTest {
inputs.put("sleepTime", sleepTime);
Scheduling scheduling = new Scheduling(20);
LaunchParameter launchParameter = new LaunchParameter("HelloWorld", inputs, true, scheduling);
LaunchParameter launchParameter = new LaunchParameter("HelloWorld", inputs, scheduling, true);
logger.debug("{} to be serialized : {}", launchParameter.getClass().getSimpleName(), launchParameter);