@Beta public class ChefLifecycleEffectorTasks extends MachineLifecycleEffectorTasks implements ChefConfig
Instances of this should use the ChefConfig config attributes to configure startup,
and invoke usePidFile(String) or useService(String) to determine check-running and stop behaviour.
Alternatively this can be subclassed and postStartCustom() and stopProcessesAtMachine() overridden.
MachineLifecycleEffectorTasks.StopMachineDetails<T>ChefConfig.ChefModesLOCATIONS, ON_BOX_BASE_DIR_RESOLVED, STOP_PROCESS_TIMEOUTCHEF_COOKBOOK_PRIMARY_NAME, CHEF_COOKBOOK_URLS, CHEF_COOKBOOKS, CHEF_LAUNCH_ATTRIBUTES, CHEF_LAUNCH_RUN_LIST, CHEF_MODE, CHEF_NODE_NAME, CHEF_RUN_CONVERGE_TWICE, CHEF_RUN_LIST, KNIFE_CONFIG_FILE, KNIFE_EXECUTABLE, KNIFE_SETUP_COMMANDS, PID_FILE, SERVICE_NAME, WINDOWS_SERVICE_NAME| Constructor and Description |
|---|
ChefLifecycleEffectorTasks() |
| Modifier and Type | Method and Description |
|---|---|
void |
attachLifecycleEffectors(Entity entity)
Attaches lifecycle effectors (start, restart, stop) to the given entity post-creation.
|
static ChefConfig.ChefModes |
detectChefMode(Entity entity) |
java.lang.String |
getPidFile() |
java.lang.String |
getServiceName() |
java.lang.String |
getWindowsServiceName() |
ChefLifecycleEffectorTasks |
usePidFile(java.lang.String pidFile) |
ChefLifecycleEffectorTasks |
useService(java.lang.String serviceName) |
ChefLifecycleEffectorTasks |
useWindowsService(java.lang.String serviceName) |
canStop, getStopMachineMode, newRestartEffector, newRestartEffectorTask, newStartEffector, newStartEffectorTask, newStopEffector, newStopEffectorTask, resolveOnBoxDir, restart, restart, start, stop, stoppublic ChefLifecycleEffectorTasks usePidFile(java.lang.String pidFile)
public ChefLifecycleEffectorTasks useService(java.lang.String serviceName)
public ChefLifecycleEffectorTasks useWindowsService(java.lang.String serviceName)
public java.lang.String getPidFile()
public java.lang.String getServiceName()
public java.lang.String getWindowsServiceName()
public void attachLifecycleEffectors(Entity entity)
MachineLifecycleEffectorTasksattachLifecycleEffectors in class MachineLifecycleEffectorTaskspublic static ChefConfig.ChefModes detectChefMode(Entity entity)