Package jetbrains.buildServer.serverSide
Interface PersistTask
-
- All Known Subinterfaces:
BackgroundPersistTask,PersistTaskEx
- All Known Implementing Classes:
BasePersistTask,ProjectPersistTask
public interface PersistTask
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidawait()Blocks caller until task is finished.booleanawait(long timeoutMillis)Blocks caller until the task is finished or timeout is exceeded.default voidawaitUninterruptibly()Blocks caller until task is finished.StringgetDescription()Returns task description.ThrowablegetError()Returns an error thrown by fs operation ornullif there was no errors.longgetId()PersistTaskStagegetStage()
-
-
-
Method Detail
-
getId
long getId()
-
await
void await() throws InterruptedExceptionBlocks caller until task is finished.- Throws:
InterruptedException- if someone interrupts the caller thread
-
await
boolean await(long timeoutMillis) throws InterruptedExceptionBlocks caller until the task is finished or timeout is exceeded.- Parameters:
timeoutMillis- timeout in milliseconds to wait- Returns:
trueif the task finished,falseotherwise- Throws:
InterruptedException- if the thread was interrupted
-
awaitUninterruptibly
default void awaitUninterruptibly()
Blocks caller until task is finished. If caller thread is interrupted this method doesn't throw an InterruptedException and continues to wait until the task is finished. When the thread returns from this method its interrupt status will be set.
-
getDescription
@NotNull String getDescription()
Returns task description.- Returns:
- task description
-
getError
@Nullable Throwable getError()
Returns an error thrown by fs operation ornullif there was no errors.- Returns:
- an error thrown by fs operation or
nullif there was no errors
-
getStage
@NotNull PersistTaskStage getStage()
-
-