Package jetbrains.buildServer.serverSide
Interface PersistTask
-
public interface PersistTask
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
await()
Blocks caller until task is finished.boolean
await(long timeoutMillis)
Blocks caller until the task is finished or timeout is exceeded.default void
awaitUninterruptibly()
Blocks caller until task is finished.java.lang.String
getDescription()
Returns task description.java.lang.Throwable
getError()
Returns an error thrown by fs operation ornull
if there was no errors.long
getId()
PersistTaskStage
getStage()
-
-
-
Method Detail
-
getId
long getId()
-
await
void await() throws java.lang.InterruptedException
Blocks caller until task is finished.- Throws:
java.lang.InterruptedException
- if someone interrupts the caller thread
-
await
boolean await(long timeoutMillis) throws java.lang.InterruptedException
Blocks caller until the task is finished or timeout is exceeded.- Parameters:
timeoutMillis
- timeout in milliseconds to wait- Returns:
true
if the task finished,false
otherwise- Throws:
java.lang.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 java.lang.String getDescription()
Returns task description.- Returns:
- task description
-
getError
@Nullable java.lang.Throwable getError()
Returns an error thrown by fs operation ornull
if there was no errors.- Returns:
- an error thrown by fs operation or
null
if there was no errors
-
getStage
@NotNull PersistTaskStage getStage()
-
-