Merged from private branch for release 4.1.0
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor-client@131613 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3a3bf10012
commit
15032e4af8
42
pom.xml
42
pom.xml
|
@ -26,32 +26,42 @@
|
|||
<url>https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/${project.artifactId}</url>
|
||||
</scm>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>gcube-bom</artifactId>
|
||||
<version>LATEST</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-generic-clients</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-gcube-calls</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-jaxws-calls</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.vremanagement</groupId>
|
||||
<artifactId>smart-executor-api</artifactId>
|
||||
<version>[1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-generic-clients</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-gcube-calls</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-jaxws-calls</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.5</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Test Dependency -->
|
||||
|
|
|
@ -70,7 +70,5 @@ public class ExecutorPlugin extends AbstractPlugin<SmartExecutor, SmartExecutorP
|
|||
throws Exception {
|
||||
return StubFactory.stubFor(Constants.smartExecutor).at(endpoint);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.gcube.vremanagement.executor.exception.LaunchException;
|
|||
import org.gcube.vremanagement.executor.exception.PluginInstanceNotFoundException;
|
||||
import org.gcube.vremanagement.executor.exception.PluginNotFoundException;
|
||||
import org.gcube.vremanagement.executor.plugin.PluginState;
|
||||
import org.gcube.vremanagement.executor.plugin.PluginStateEvolution;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -57,24 +58,13 @@ public class DefaultSmartExecutorProxy implements SmartExecutorProxy {
|
|||
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
/**
|
||||
* It is the same of calling
|
||||
* unSchedule(String executionIdentifier, boolean globally)
|
||||
* Passing false to globally
|
||||
*/
|
||||
public boolean unSchedule(final String executionIdentifier) throws ExecutorException {
|
||||
Call<SmartExecutor, Boolean> call = new Call<SmartExecutor, Boolean>() {
|
||||
@Override
|
||||
public Boolean call(SmartExecutor endpoint) throws Exception {
|
||||
logger.debug("Calling unSchedule(String) function");
|
||||
return endpoint.unSchedule(executionIdentifier);
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
return proxyDelegate.make(call);
|
||||
} catch (Exception e) {
|
||||
logger.debug("Failed to call unSchedule(String) function");
|
||||
throw again(e).asServiceException();
|
||||
}
|
||||
|
||||
return this.unSchedule(executionIdentifier, false);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
@ -98,15 +88,23 @@ public class DefaultSmartExecutorProxy implements SmartExecutorProxy {
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Deprecated
|
||||
@Override
|
||||
public PluginState getState(final String executionIdentifier)
|
||||
throws PluginInstanceNotFoundException, ExecutorException {
|
||||
return getStateEvolution(executionIdentifier).getPluginState();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public PluginStateEvolution getStateEvolution(final String executionIdentifier)
|
||||
throws PluginInstanceNotFoundException, ExecutorException {
|
||||
|
||||
Call<SmartExecutor, PluginState> call = new Call<SmartExecutor, PluginState>() {
|
||||
Call<SmartExecutor, PluginStateEvolution> call = new Call<SmartExecutor, PluginStateEvolution>() {
|
||||
@Override
|
||||
public PluginState call(SmartExecutor endpoint) throws Exception {
|
||||
public PluginStateEvolution call(SmartExecutor endpoint) throws Exception {
|
||||
logger.debug("Calling getState(String) function");
|
||||
return endpoint.getState(executionIdentifier);
|
||||
return endpoint.getStateEvolution(executionIdentifier);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -120,15 +118,23 @@ public class DefaultSmartExecutorProxy implements SmartExecutorProxy {
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Deprecated
|
||||
@Override
|
||||
public PluginState getIterationState(final String executionIdentifier, final int iterationNumber)
|
||||
throws PluginInstanceNotFoundException, ExecutorException {
|
||||
return getIterationStateEvolution(executionIdentifier, iterationNumber).getPluginState();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public PluginStateEvolution getIterationStateEvolution(final String executionIdentifier, final int iterationNumber)
|
||||
throws PluginInstanceNotFoundException, ExecutorException {
|
||||
|
||||
Call<SmartExecutor, PluginState> call = new Call<SmartExecutor, PluginState>() {
|
||||
Call<SmartExecutor, PluginStateEvolution> call = new Call<SmartExecutor, PluginStateEvolution>() {
|
||||
@Override
|
||||
public PluginState call(SmartExecutor endpoint) throws Exception {
|
||||
public PluginStateEvolution call(SmartExecutor endpoint) throws Exception {
|
||||
logger.debug("Calling getIterationState(String, int) function");
|
||||
return endpoint.getIterationState(executionIdentifier, iterationNumber);
|
||||
return endpoint.getIterationStateEvolution(executionIdentifier, iterationNumber);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue