Package org.jclouds.compute.callables
Class InitScriptConfigurationForTasks
- java.lang.Object
-
- org.jclouds.compute.callables.InitScriptConfigurationForTasks
-
@Singleton public class InitScriptConfigurationForTasks extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_INIT_SCRIPT_PATTERN
-
Constructor Summary
Constructors Modifier Constructor Description protected
InitScriptConfigurationForTasks()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InitScriptConfigurationForTasks
appendCurrentTimeMillisToAnonymousTaskNames()
InitScriptConfigurationForTasks
appendIncrementingNumberToAnonymousTaskNames()
static InitScriptConfigurationForTasks
create()
com.google.common.base.Supplier<String>
getAnonymousTaskSuffixSupplier()
String
getBasedir()
Directory where the init script is stored.String
getInitScriptPattern()
InitScriptConfigurationForTasks
initScriptPattern(String initScriptPattern)
-
-
-
Field Detail
-
PROPERTY_INIT_SCRIPT_PATTERN
public static final String PROPERTY_INIT_SCRIPT_PATTERN
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static InitScriptConfigurationForTasks create()
-
initScriptPattern
@Inject(optional=true) public InitScriptConfigurationForTasks initScriptPattern(@Named("jclouds.compute.init-script-pattern") String initScriptPattern)
-
appendCurrentTimeMillisToAnonymousTaskNames
public InitScriptConfigurationForTasks appendCurrentTimeMillisToAnonymousTaskNames()
-
appendIncrementingNumberToAnonymousTaskNames
public InitScriptConfigurationForTasks appendIncrementingNumberToAnonymousTaskNames()
-
getBasedir
public String getBasedir()
Directory where the init script is stored. the runtime directory of the process will be in this dir/taskName
-
getInitScriptPattern
public String getInitScriptPattern()
- Returns:
- the naming convention of init scripts. ex.
/tmp/init-%s
, noting logs are under the basedir/%s where %s is the taskName - See Also:
InitScript#getHomeDir
,InitScript#getLogDir
-
getAnonymousTaskSuffixSupplier
public com.google.common.base.Supplier<String> getAnonymousTaskSuffixSupplier()
- Returns:
- suffix where the taskName isn't set. by default this is
System.currentTimeMillis()
- See Also:
appendCurrentTimeMillisToAnonymousTaskNames()
,appendIncrementingNumberToAnonymousTaskNames()
-
-