|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.vremanagement.deployer.impl.operators.common.BaseScheduler
org.gcube.common.vremanagement.deployer.impl.operators.common.RebootScheduler
public class RebootScheduler
Scheduler to execute the packages' reboot scripts.
These script are meant to prepare the environment for the package that brings each of them.
Therefore, they must be executed from an external process, immediately before the gContainer process is going to start.
The scheduler serializes the list of packages on this file: ServiceContext.getContext().getFile("reboot_scripts")
It is expected that the gcore-start-container-* scripts take care of this list by executing them before to start the gContainer itself.
Scheduler| Field Summary |
|---|
| Fields inherited from class org.gcube.common.vremanagement.deployer.impl.operators.common.BaseScheduler |
|---|
logger, scripts |
| Constructor Summary | |
|---|---|
RebootScheduler()
|
|
| Method Summary | |
|---|---|
void |
add(BasePackage target)
Adds the scripts belonging to the given package to the scheduler. |
static Scheduler |
getScheduler()
Creates and returns a valid scheduler |
protected 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 |
| Methods inherited from class org.gcube.common.vremanagement.deployer.impl.operators.common.BaseScheduler |
|---|
clone |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RebootScheduler()
| Method Detail |
|---|
public static Scheduler getScheduler()
throws DeployException
DeployException - if the scheduler initialization fails
public void add(BasePackage target)
throws DeployException
add in interface Scheduleradd in class BaseSchedulertarget - the package
DeployException - if the methods fails when adding the script
public void remove(BasePackage target)
throws DeployException
remove in interface Schedulerremove in class BaseSchedulertarget - the package
DeployException - if the methods fails when removing all the scripts
public void run(KeyData key)
throws DeployException
run in interface Schedulerrun in class BaseSchedulerkey - the package key
DeployException - if one of the scripts failsprotected List<String> getScriptsToSchedule(BasePackage target)
getScriptsToSchedule in class BaseSchedulertarget - the package
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||