refs #89: Save Task Evolution on NoSQL global DB

https://support.d4science.org/issues/89
Implementing Feature

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor-client@117713 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-08-26 16:02:24 +00:00
parent 797733895f
commit 9743b8b748
1 changed files with 45 additions and 0 deletions

View File

@ -59,6 +59,7 @@ public class DefaultSmartExecutorProxy implements SmartExecutorProxy {
/** {@inheritDoc} */
@Override
@Deprecated
public PluginState getState(final String executionIdentifier)
throws PluginInstanceNotFoundException, ExecutorException {
@ -81,6 +82,7 @@ public class DefaultSmartExecutorProxy implements SmartExecutorProxy {
/** {@inheritDoc} */
@Override
@Deprecated
public PluginState getIterationState(final String executionIdentifier, final int iterationNumber)
throws PluginInstanceNotFoundException, ExecutorException {
@ -99,4 +101,47 @@ public class DefaultSmartExecutorProxy implements SmartExecutorProxy {
throw again(e).asServiceException();
}
}
/** {@inheritDoc} */
@Override
public PluginState getState(final String pluginName, final String executionIdentifier)
throws PluginInstanceNotFoundException, ExecutorException {
Call<SmartExecutor, PluginState> call = new Call<SmartExecutor, PluginState>() {
@Override
public PluginState call(SmartExecutor endpoint) throws Exception {
logger.debug("Calling getState() function");
return endpoint.getState(pluginName, executionIdentifier);
}
};
try {
return proxyDelegate.make(call);
} catch (Exception e) {
logger.debug("Failed to call getState() function");
throw again(e).asServiceException();
}
}
/** {@inheritDoc} */
@Override
public PluginState getIterationState(final String pluginName, final String executionIdentifier, final int iterationNumber)
throws PluginInstanceNotFoundException, ExecutorException {
Call<SmartExecutor, PluginState> call = new Call<SmartExecutor, PluginState>() {
@Override
public PluginState call(SmartExecutor endpoint) throws Exception {
logger.debug("Calling getState() function");
return endpoint.getIterationState(pluginName, executionIdentifier, iterationNumber);
}
};
try {
return proxyDelegate.make(call);
} catch (Exception e) {
logger.debug("Failed to call getState() function");
throw again(e).asServiceException();
}
}
}