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 boolean
cancel(boolean mayInterruptIfRunning)
int
compareTo(Delayed o)
String
describe(boolean verbose)
V
get()
V
get(long timeout, TimeUnit unit)
long
getDelay(TimeUnit unit)
TaskMetadata
getMetadata()
boolean
isCancelled()
boolean
isDone()
boolean
isPeriodic()
void
run()
-
-
-
Constructor Detail
-
RunnableScheduledFutureWrapper
public RunnableScheduledFutureWrapper(@NotNull RunnableScheduledFuture<V> delegate, @NotNull String name, @NotNull TaskMetadata taskMetadata)
-
-
Method Detail
-
isPeriodic
public boolean isPeriodic()
- Specified by:
isPeriodic
in interfaceRunnableScheduledFuture<V>
-
run
public void run()
- Specified by:
run
in interfaceRunnable
- Specified by:
run
in interfaceRunnableFuture<V>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<V>
-
get
public V get() throws InterruptedException, ExecutionException
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
-
get
public V get(long timeout, @NotNull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
compareTo
public int compareTo(@NotNull Delayed o)
- Specified by:
compareTo
in interfaceComparable<V>
-
describe
@NotNull public String describe(boolean verbose)
-
getMetadata
@NotNull public TaskMetadata getMetadata()
- Specified by:
getMetadata
in interfaceMetadataHolder
- Returns:
TaskMetadata
related with current task
-
-