org.jclouds.compute.callables
Class InitScriptConfigurationForTasks

java.lang.Object
  extended by org.jclouds.compute.callables.InitScriptConfigurationForTasks

@Singleton
public class InitScriptConfigurationForTasks
extends Object

Author:
Adrian Cole

Field Summary
static String PROPERTY_INIT_SCRIPT_PATTERN
           
 
Constructor Summary
protected InitScriptConfigurationForTasks()
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_INIT_SCRIPT_PATTERN

public static final String PROPERTY_INIT_SCRIPT_PATTERN
See Also:
Constant Field Values
Constructor Detail

InitScriptConfigurationForTasks

protected InitScriptConfigurationForTasks()
Method Detail

create

public static InitScriptConfigurationForTasks create()

initScriptPattern

@Inject(optional=true)
public InitScriptConfigurationForTasks initScriptPattern(@Named(value="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()


Copyright © 2009-2012 jclouds. All Rights Reserved.