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 intexecuteCount
-
Constructor Summary
Constructors Constructor Description MockScheduledExecutorService()MockScheduledExecutorService(boolean runInplace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanawaitTermination(long timeout, TimeUnit unit)voidexecute(Runnable command)booleanisShutdown()booleanisTerminated()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)voidshutdown()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:
schedulein interfaceScheduledExecutorService
-
schedule
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
- Specified by:
schedulein interfaceScheduledExecutorService
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
- Specified by:
scheduleAtFixedRatein interfaceScheduledExecutorService
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
- Specified by:
scheduleWithFixedDelayin interfaceScheduledExecutorService
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceExecutorService- Overrides:
shutdownin classTeamCityThreadPoolExecutor
-
shutdownNow
public List<Runnable> shutdownNow()
- Specified by:
shutdownNowin interfaceExecutorService- Overrides:
shutdownNowin classThreadPoolExecutor
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdownin interfaceExecutorService- Overrides:
isShutdownin classThreadPoolExecutor
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminatedin interfaceExecutorService- Overrides:
isTerminatedin classThreadPoolExecutor
-
awaitTermination
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException- Specified by:
awaitTerminationin interfaceExecutorService- Overrides:
awaitTerminationin classThreadPoolExecutor- Throws:
InterruptedException
-
execute
public void execute(Runnable command)
- Specified by:
executein interfaceExecutor- Overrides:
executein classThreadPoolExecutor
-
submit
@NotNull public Future<?> submit(@NotNull Runnable task)
- Specified by:
submitin interfaceExecutorService- Overrides:
submitin classAbstractExecutorService
-
submit
@NotNull public <T> Future<T> submit(@NotNull Runnable task, T result)
- Specified by:
submitin interfaceExecutorService- Overrides:
submitin classAbstractExecutorService
-
submit
@NotNull public <T> Future<T> submit(@NotNull Callable<T> task)
- Specified by:
submitin interfaceExecutorService- Overrides:
submitin classAbstractExecutorService
-
-