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:
parent
e952fdb616
commit
4b39c6845c
1
pom.xml
1
pom.xml
|
@ -33,6 +33,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.thoughtworks.xstream</groupId>
|
<groupId>com.thoughtworks.xstream</groupId>
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -3,7 +3,6 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.vremanagement.executor.plugin;
|
package org.gcube.vremanagement.executor.plugin;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||||
|
@ -11,16 +10,11 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public interface PluginStateNotification {
|
public interface PluginStateNotification {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Persist the new state of plugin
|
* Persist the new state of plugin
|
||||||
* @param uuid the UUID which identify the current execution
|
* @param pluginStateEvolution the PluginStateEvolution record to persist
|
||||||
* @param timestamp the time of the new {@link PluginState}
|
|
||||||
* @param pluginDeclaration the pluginDeclaration
|
|
||||||
* @param pluginState the {@link PluginState} value
|
|
||||||
* @throws Exception if fails
|
* @throws Exception if fails
|
||||||
*/
|
*/
|
||||||
public abstract void pluginStateEvolution(UUID uuid, int lauchedtimes,
|
public abstract void pluginStateEvolution(PluginStateEvolution pluginStateEvolution)
|
||||||
long timestamp, String pluginName, PluginState pluginState)
|
|
||||||
throws Exception;
|
throws Exception;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue