77 lines
2.0 KiB
Java
77 lines
2.0 KiB
Java
/**
|
|
*
|
|
*/
|
|
package org.gcube.vremanagement.smartexecutor.sweeper;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
import org.gcube.vremanagement.executor.plugin.Plugin;
|
|
import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
/**
|
|
* Scheduled Task Sweeper find orphaned scheduled task on SmartExecutor
|
|
* persistence and make them available. This requires interaction with
|
|
* SmartExecutor Persistence and with IS t find orphaned Running Instances
|
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
|
*/
|
|
public class ScheduledTaskSweeperPluginDeclaration implements PluginDeclaration {
|
|
|
|
/**
|
|
* Logger
|
|
*/
|
|
private static Logger logger = LoggerFactory.getLogger(ScheduledTaskSweeperPlugin.class);
|
|
|
|
/**
|
|
* Plugin name used by the Executor to retrieve this class
|
|
*/
|
|
public static final String NAME = "ScheduledTaskSweeper";
|
|
public static final String DESCRIPTION =
|
|
"Scheduled Task Sweeper find orphaned scheduled task on SmartExecutor "
|
|
+ "persistence and make them available. This requires interaction with "
|
|
+ "SmartExecutor Persistence and with IS to find orphaned Running "
|
|
+ "Instances";
|
|
public static final String VERSION = "1.0.0";
|
|
|
|
/**{@inheritDoc}*/
|
|
@Override
|
|
public void init() {
|
|
logger.debug(String.format("%s initialized", ScheduledTaskSweeperPlugin.class.getSimpleName()));
|
|
}
|
|
|
|
/**{@inheritDoc}*/
|
|
@Override
|
|
public String getName() {
|
|
return NAME;
|
|
}
|
|
|
|
/**{@inheritDoc}*/
|
|
@Override
|
|
public String getDescription() {
|
|
return DESCRIPTION;
|
|
}
|
|
|
|
/**{@inheritDoc}*/
|
|
@Override
|
|
public String getVersion() {
|
|
return VERSION;
|
|
}
|
|
|
|
/**{@inheritDoc}*/
|
|
@Override
|
|
public Map<String, String> getSupportedCapabilities() {
|
|
Map<String, String> discoveredCapabilities = new HashMap<String, String>();
|
|
// No capabilities to discover
|
|
return discoveredCapabilities;
|
|
}
|
|
|
|
/**{@inheritDoc}*/
|
|
@Override
|
|
public Class<? extends Plugin<? extends PluginDeclaration>> getPluginImplementation() {
|
|
return ScheduledTaskSweeperPlugin.class;
|
|
}
|
|
|
|
}
|