Class MockScheduledExecutorService
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- jetbrains.buildServer.util.executors.TeamCityThreadPoolExecutor
-
- jetbrains.buildServer.util.executors.ScalingThreadPoolExecutor
-
- jetbrains.buildServer.serverSide.impl.executors.MockScheduledExecutorService
-
- All Implemented Interfaces:
Executor
,ExecutorService
,ScheduledExecutorService
,ExecutorServiceEx
- Direct Known Subclasses:
BuildFinishMockScheduledExecutorService
public class MockScheduledExecutorService extends ScalingThreadPoolExecutor implements ScheduledExecutorService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
-
Field Summary
Fields Modifier and Type Field Description int
executeCount
-
Constructor Summary
Constructors Constructor Description MockScheduledExecutorService()
MockScheduledExecutorService(boolean runInplace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long timeout, TimeUnit unit)
void
execute(Runnable command)
boolean
isShutdown()
boolean
isTerminated()
ScheduledFuture<?>
schedule(Runnable command, long delay, TimeUnit unit)
<V> ScheduledFuture<V>
schedule(Callable<V> callable, long delay, TimeUnit unit)
ScheduledFuture<?>
scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
ScheduledFuture<?>
scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
void
shutdown()
List<Runnable>
shutdownNow()
Future<?>
submit(Runnable task)
<T> Future<T>
submit(Runnable task, T result)
<T> Future<T>
submit(Callable<T> task)
-
Methods inherited from class jetbrains.buildServer.util.executors.ScalingThreadPoolExecutor
getMaxQueueCapacity, getQueue, getRejectsCount
-
Methods inherited from class jetbrains.buildServer.util.executors.TeamCityThreadPoolExecutor
afterExecute, beforeExecute, getName, getQueuedTasksCount, isPaused, newTaskFor, newTaskFor, pause, resume, setPoolSize
-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toString
-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.concurrent.ExecutorService
invokeAll, invokeAll, invokeAny, invokeAny
-
Methods inherited from interface jetbrains.buildServer.util.executors.ExecutorServiceEx
getActiveCount
-
-
-
-
Method Detail
-
schedule
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
- Specified by:
schedule
in interfaceScheduledExecutorService
-
schedule
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
- Specified by:
schedule
in interfaceScheduledExecutorService
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
- Specified by:
scheduleAtFixedRate
in interfaceScheduledExecutorService
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
- Specified by:
scheduleWithFixedDelay
in interfaceScheduledExecutorService
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceExecutorService
- Overrides:
shutdown
in classTeamCityThreadPoolExecutor
-
shutdownNow
public List<Runnable> shutdownNow()
- Specified by:
shutdownNow
in interfaceExecutorService
- Overrides:
shutdownNow
in classThreadPoolExecutor
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfaceExecutorService
- Overrides:
isShutdown
in classThreadPoolExecutor
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfaceExecutorService
- Overrides:
isTerminated
in classThreadPoolExecutor
-
awaitTermination
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
- Specified by:
awaitTermination
in interfaceExecutorService
- Overrides:
awaitTermination
in classThreadPoolExecutor
- Throws:
InterruptedException
-
execute
public void execute(Runnable command)
- Specified by:
execute
in interfaceExecutor
- Overrides:
execute
in classThreadPoolExecutor
-
submit
@NotNull public Future<?> submit(@NotNull Runnable task)
- Specified by:
submit
in interfaceExecutorService
- Overrides:
submit
in classAbstractExecutorService
-
submit
@NotNull public <T> Future<T> submit(@NotNull Runnable task, T result)
- Specified by:
submit
in interfaceExecutorService
- Overrides:
submit
in classAbstractExecutorService
-
submit
@NotNull public <T> Future<T> submit(@NotNull Callable<T> task)
- Specified by:
submit
in interfaceExecutorService
- Overrides:
submit
in classAbstractExecutorService
-
-