Package org.jtrim2.executor
Interface MonitorableTaskExecutorService
- All Superinterfaces:
ContextAwareTaskExecutor,ContextAwareTaskExecutorService,Executor,MonitorableTaskExecutor,TaskExecutor,TaskExecutorService
- All Known Implementing Classes:
SingleThreadedExecutor,SyncTaskExecutor,ThreadPoolTaskExecutor
public interface MonitorableTaskExecutorService
extends ContextAwareTaskExecutorService, MonitorableTaskExecutor
Defines a
TaskExecutor which is able to provide a few statistical
information about the currently queued tasks. This information cannot be used
for synchronization purposes and should be considered unreliable. However,
you can base some decision on these methods: For example, if the
number of queued tasks exceed a predefined
constant, you may decide to schedule tasks slower to the executor.
Thread safety
Implementations of this interface are required to be safely accessible from multiple threads concurrently.Synchronization transparency
The methods of this interface are not required to be synchronization transparent because they may execute tasks, completion handlers tasks, etc.-
Method Summary
Methods inherited from interface org.jtrim2.executor.ContextAwareTaskExecutor
isExecutingInThisMethods inherited from interface org.jtrim2.executor.MonitorableTaskExecutor
getNumberOfExecutingTasks, getNumberOfQueuedTasksMethods inherited from interface org.jtrim2.executor.TaskExecutor
execute, execute, executeFunction, executeStagedMethods inherited from interface org.jtrim2.executor.TaskExecutorService
addTerminateListener, awaitTermination, isShutdown, isTerminated, shutdown, shutdownAndCancel, tryAwaitTermination