Package pl.morgwai.base.grpc.utils
Class FakeResponseObserver.LoggingExecutor
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- pl.morgwai.base.grpc.utils.FakeResponseObserver.LoggingExecutor
-
- All Implemented Interfaces:
Executor
,ExecutorService
- Enclosing class:
- FakeResponseObserver<ResponseT>
public static class FakeResponseObserver.LoggingExecutor extends ThreadPoolExecutor
Logs task scheduling and executions and scheduling rejections.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
-
Constructor Summary
Constructors Constructor Description LoggingExecutor(String name, int poolSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long timeoutMillis)
void
execute(Runnable task)
String
getName()
List<Runnable>
getRejectedTasks()
List of all rejected tasks.void
shutdown()
List<Runnable>
shutdownNow()
-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toString
-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
-
-
-
Constructor Detail
-
LoggingExecutor
public LoggingExecutor(String name, int poolSize)
-
-
Method Detail
-
getName
public String getName()
-
execute
public void execute(Runnable task)
- Specified by:
execute
in interfaceExecutor
- Overrides:
execute
in classThreadPoolExecutor
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceExecutorService
- Overrides:
shutdown
in classThreadPoolExecutor
-
shutdownNow
public List<Runnable> shutdownNow()
- Specified by:
shutdownNow
in interfaceExecutorService
- Overrides:
shutdownNow
in classThreadPoolExecutor
-
awaitTermination
public boolean awaitTermination(long timeoutMillis) throws InterruptedException
- Throws:
InterruptedException
-
-