Package jetbrains.buildServer.serverSide
Interface MultiNodeTasks.SubmittedTask
-
- All Superinterfaces:
MultiNodeTasks.PersistedTask
,MultiNodeTasks.Task
- Enclosing interface:
- MultiNodeTasks
public static interface MultiNodeTasks.SubmittedTask extends MultiNodeTasks.PersistedTask
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getExecutorNodeId()
Return node which is executing the task or null if the task is still in the queueString
getResult()
boolean
isDone()
True when the task is completed (successfully or cancelled).boolean
isDoneSuccessfully()
True when the task is completed sucessfully (not cancelled and no exception because node became disconnected).void
waitFor()
Wait until the task in completed.void
waitFor(long timeout, TimeUnit timeUnit)
void
whenComplete(Runnable action)
Execute some action when the task is completed.-
Methods inherited from interface jetbrains.buildServer.serverSide.MultiNodeTasks.PersistedTask
cancel, finished, finished, getCreateTime, getId, getLastActivityTime, getLongStrArgUUID, isCancelled, setLastActivityTime
-
Methods inherited from interface jetbrains.buildServer.serverSide.MultiNodeTasks.Task
getIdentity, getLongArg1, getLongArg2, getStringArg, getType
-
-
-
-
Method Detail
-
getExecutorNodeId
@Nullable String getExecutorNodeId()
Return node which is executing the task or null if the task is still in the queue
-
isDone
boolean isDone()
True when the task is completed (successfully or cancelled).
-
isDoneSuccessfully
boolean isDoneSuccessfully()
True when the task is completed sucessfully (not cancelled and no exception because node became disconnected).
-
whenComplete
void whenComplete(@NotNull Runnable action)
Execute some action when the task is completed.
-
waitFor
void waitFor() throws InterruptedException, ExecutionException, CancellationException
Wait until the task in completed.- Throws:
CancellationException
- when the task was cancelledInterruptedException
ExecutionException
-
waitFor
void waitFor(long timeout, @NotNull TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException, CancellationException
-
getResult
@Nullable String getResult()
- Returns:
- a result associated with the task or null if there is no result
- Since:
- 2022.10
-
-