refs #579: Use Persistence to persist Scheduled Task configuration on smart-executor

https://support.d4science.org/issues/579

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor-api@119428 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-10-06 10:03:57 +00:00
parent e952fdb616
commit 4b39c6845c
3 changed files with 40 additions and 8 deletions

View File

@ -33,6 +33,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>

View File

@ -0,0 +1,37 @@
/**
*
*/
package org.gcube.vremanagement.executor.plugin;
import java.util.UUID;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*
*/
public class PluginStateEvolution {
protected final UUID uuid;
protected final int iteration;
protected final long timestamp;
protected final PluginDeclaration pluginDeclaration;
protected final PluginState pluginState;
/**
*
* @param uuid the UUID which identify the current execution
* @param timestamp the time of the new {@link PluginState}
* @param pluginDeclaration the pluginDeclaration
* @param pluginState the {@link PluginState} value
* @throws Exception if fails
*/
public PluginStateEvolution(UUID uuid, int iteration, long timestamp,
PluginDeclaration pluginDeclaration, PluginState pluginState) {
this.uuid = uuid;
this.iteration = iteration;
this.timestamp = timestamp;
this.pluginDeclaration = pluginDeclaration;
this.pluginState = pluginState;
}
}

View File

@ -3,7 +3,6 @@
*/
package org.gcube.vremanagement.executor.plugin;
import java.util.UUID;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
@ -11,16 +10,11 @@ import java.util.UUID;
*/
public interface PluginStateNotification {
/**
* Persist the new state of plugin
* @param uuid the UUID which identify the current execution
* @param timestamp the time of the new {@link PluginState}
* @param pluginDeclaration the pluginDeclaration
* @param pluginState the {@link PluginState} value
* @param pluginStateEvolution the PluginStateEvolution record to persist
* @throws Exception if fails
*/
public abstract void pluginStateEvolution(UUID uuid, int lauchedtimes,
long timestamp, String pluginName, PluginState pluginState)
public abstract void pluginStateEvolution(PluginStateEvolution pluginStateEvolution)
throws Exception;
}