Groovy Documentation

org.linkedin.glu.commands.impl
[Groovy] Class CommandExecution

java.lang.Object
  org.linkedin.glu.commands.impl.CommandExecution

class CommandExecution

Authors:
yan@pongasoft.com


Property Summary
FutureTaskExecution _futureExecution

T command

long completionTime

long startTime

CommandStreamStorage storage

 
Constructor Summary
CommandExecution(java.lang.String commandId, java.lang.Object args)

 
Method Summary
FutureTaskExecution asyncCaptureIO(Submitter submitter, groovy.lang.Closure closure)

Asynchronously executes the command.

java.lang.Object getArgs()

Map of arguments used to create the command

java.lang.Object getCompletionValue()

Completion value either return the result of the call if succeeded or the exception if an exception was thrown.

java.lang.Object getCompletionValue(java.lang.Object timeout)

Completion value either return the result of the call if succeeded or the exception if an exception was thrown.

java.lang.Object getExitValue(java.lang.Object timeout)

java.lang.Object getExitValueIfCompleted()

java.lang.String getId()

Logger getLog()

boolean hasStdin()

boolean interruptExecution()

boolean isCompleted()

boolean isRedirectStderr()

void setFutureExecution(FutureTaskExecution futureExecution)

java.lang.Object syncCaptureIO(groovy.lang.Closure closure)

Synchronously executes the command

void waitForCompletion(java.lang.Object timeout)

boolean waitForCompletionNoException(java.lang.Object timeout)

@param timeout

java.lang.Object waitForFutureExecution(java.lang.Object timeout = null, groovy.lang.Closure condition = null)

This method waits for 1. the future to be set, 2. the future to have started no longer than the timeout (overall).

void waitForStart(java.lang.Object timeout = null)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

_futureExecution

FutureTaskExecution _futureExecution


command

T command


completionTime

long completionTime


startTime

long startTime


storage

CommandStreamStorage storage


 
Constructor Detail

CommandExecution

CommandExecution(java.lang.String commandId, java.lang.Object args)


 
Method Detail

asyncCaptureIO

FutureTaskExecution asyncCaptureIO(Submitter submitter, groovy.lang.Closure closure)
Asynchronously executes the command. Returns right away


getArgs

java.lang.Object getArgs()
Map of arguments used to create the command


getCompletionValue

java.lang.Object getCompletionValue()
Completion value either return the result of the call if succeeded or the exception if an exception was thrown. Does not throw an exception! Does not wait!


getCompletionValue

java.lang.Object getCompletionValue(java.lang.Object timeout)
Completion value either return the result of the call if succeeded or the exception if an exception was thrown. Throws only the TimeoutException if cannot get a result in the timeout provided


getExitValue

java.lang.Object getExitValue(java.lang.Object timeout)


getExitValueIfCompleted

java.lang.Object getExitValueIfCompleted()


getId

java.lang.String getId()


getLog

Logger getLog()


hasStdin

boolean hasStdin()


interruptExecution

boolean interruptExecution()


isCompleted

boolean isCompleted()


isRedirectStderr

boolean isRedirectStderr()


setFutureExecution

void setFutureExecution(FutureTaskExecution futureExecution)


syncCaptureIO

java.lang.Object syncCaptureIO(groovy.lang.Closure closure)
Synchronously executes the command
Returns:
the exitValue of the command execution


waitForCompletion

void waitForCompletion(java.lang.Object timeout)


waitForCompletionNoException

boolean waitForCompletionNoException(java.lang.Object timeout)
Parameters:
timeout
Returns:
true if the command is completed or completes within the timeout... false otherwise


waitForFutureExecution

java.lang.Object waitForFutureExecution(java.lang.Object timeout = null, groovy.lang.Closure condition = null)
This method waits for 1. the future to be set, 2. the future to have started no longer than the timeout (overall). If another condition is provided then also await for that condition
Parameters:
timeout
condition
Returns:
whatever condition returns or null if non


waitForStart

void waitForStart(java.lang.Object timeout = null)


 

Groovy Documentation