public abstract class BaseScheduler extends Object implements Scheduler
| Modifier and Type | Field and Description |
|---|---|
protected org.gcube.common.core.utils.logging.GCUBELog |
logger |
protected Map<KeyData,Set<File>> |
scripts |
| Constructor and Description |
|---|
BaseScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(BasePackage target)
Adds the scripts belonging to the given package to the scheduler.
|
Object |
clone()
Overrides the Object.clone() method to avoid the Scheduler cloning
|
protected abstract List<String> |
getScriptsToSchedule(BasePackage target)
Extracts the scripts to schedule from the given package
|
void |
remove(BasePackage target)
Removes all the scripts of the given package from the scheduler
|
void |
run(KeyData key)
Executes all the scripts stored in the Scheduler for the given package
|
public void add(BasePackage target) throws DeployException
add in interface Schedulertarget - the packageDeployException - if the methods fails when adding the scriptpublic void remove(BasePackage target) throws DeployException
remove in interface Schedulertarget - the packageDeployException - if the methods fails when removing all the scriptspublic void run(KeyData key) throws DeployException
run in interface Schedulerkey - the package keyDeployException - if one of the scripts failsprotected abstract List<String> getScriptsToSchedule(BasePackage target)
target - the packagepublic Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException - always thrownCopyright © 2015. All Rights Reserved.