Class TeamCityScheduledThreadPoolExecutor.RunnableScheduledFutureWrapper<V>
- java.lang.Object
-
- jetbrains.buildServer.util.executors.TeamCityScheduledThreadPoolExecutor.RunnableScheduledFutureWrapper<V>
-
- All Implemented Interfaces:
Comparable<Delayed>,Runnable,Delayed,Future<V>,RunnableFuture<V>,RunnableScheduledFuture<V>,ScheduledFuture<V>,Loggable,MetadataHolder
- Enclosing class:
- TeamCityScheduledThreadPoolExecutor
public static class TeamCityScheduledThreadPoolExecutor.RunnableScheduledFutureWrapper<V> extends Object implements RunnableScheduledFuture<V>, Loggable, MetadataHolder
-
-
Constructor Summary
Constructors Constructor Description RunnableScheduledFutureWrapper(RunnableScheduledFuture<V> delegate, String name, TaskMetadata taskMetadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)intcompareTo(Delayed o)Stringdescribe(boolean verbose)Vget()Vget(long timeout, TimeUnit unit)longgetDelay(TimeUnit unit)TaskMetadatagetMetadata()booleanisCancelled()booleanisDone()booleanisPeriodic()voidrun()
-
-
-
Constructor Detail
-
RunnableScheduledFutureWrapper
public RunnableScheduledFutureWrapper(@NotNull RunnableScheduledFuture<V> delegate, @NotNull String name, @NotNull TaskMetadata taskMetadata)
-
-
Method Detail
-
isPeriodic
public boolean isPeriodic()
- Specified by:
isPeriodicin interfaceRunnableScheduledFuture<V>
-
run
public void run()
- Specified by:
runin interfaceRunnable- Specified by:
runin interfaceRunnableFuture<V>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceFuture<V>
-
get
public V get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionException
-
get
public V get(long timeout, @NotNull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
compareTo
public int compareTo(@NotNull Delayed o)- Specified by:
compareToin interfaceComparable<V>
-
describe
@NotNull public String describe(boolean verbose)
-
getMetadata
@NotNull public TaskMetadata getMetadata()
- Specified by:
getMetadatain interfaceMetadataHolder- Returns:
TaskMetadatarelated with current task
-
-