com.atlassian.bitbucket.scm.Command<T> |
Wraps an operation which may be run synchronously
. Prior to performing the operation, timeouts may
be set to control how long the operation is allowed to run without producing output or processing input (the
its idle timeout
or to provide an absolute limit how long the operation is allowed to
run (the execution timeout
.
When the operation completes, it will return an object of type T
. If T
is Void
, the operation
will return null
on completion. Typically this means the operation uses some form of callback, allowing the
caller to process the results as they are produced rather than returning them on completion.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Transforms this
Command into an AsyncCommand which may be called asynchronously. | |||||||||||
Executes a command
| |||||||||||
Sets the maximum time, in seconds, the operation is allowed to run.
| |||||||||||
Sets the maximum time, in seconds, the operation is allowed to run without either producing output or
processing input.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
java.util.concurrent.Callable
|
Transforms this Command
into an AsyncCommand
which may be called asynchronously. Any timeouts
applied this command will not be applied to the resulting AsyncCommand
.
Once an Command
has been transformed for asynchronous use, it may no longer be used
synchronously
.
AsyncCommand
for running the operation embodied by this Command
asynchronously
UnsupportedOperationException | if the implementation cannot internally convert the operation for asynchronous execution |
---|
Executes a command
CommandCanceledException | if command execution is canceled |
---|---|
ServiceException | if an error occurs while performing the operation |
Sets the maximum time, in seconds, the operation is allowed to run. The operation will be aborted automatically if it hasn't completed in this time even if it is still producing output or processing input.
timeoutInSecs | the maximum time the operation is allowed to run, in seconds |
---|
UnsupportedOperationException | if the implementation does not support configuring an execution timeout |
---|
Sets the maximum time, in seconds, the operation is allowed to run without either producing output or processing input. Output may be produced on either the standard output or standard error streams.
timeoutInSecs | the maximum time the operation is allowed to be idle, in seconds |
---|
UnsupportedOperationException | if the implementation does not support configuring an idle timeout |
---|