public interface ExecutorObserver
ObservableExecutors
class.ObservableExecutorService,
then the Runnable instances that it receives should
always be ObservableTask instances. The
ObservableExecutors.getInnerTask(Runnable, Class) method may
be used to extract the task that originally has been submitted to
the executor service.
| Modifier and Type | Method and Description |
|---|---|
void |
afterExecute(Runnable r,
Throwable t)
Will be called after the given task was executed
|
void |
beforeExecute(Thread t,
Runnable r)
Will be called before the given thread executes the given task.
|
void |
scheduled(Runnable r)
Will be called when the given task was scheduled for execution in
the executor service.
|
void |
tasksFinished()
Will be called after all tasks have been finished.
|
void scheduled(Runnable r)
r - The task.void beforeExecute(Thread t, Runnable r)
t - The threadr - The taskvoid afterExecute(Runnable r, Throwable t)
r - The taskt - A throwable that may have been causedvoid tasksFinished()
afterExecute(Runnable, Throwable) was called
and no new tasks have been scheduled(Runnable) in
the meantime.Copyright © 2016. All rights reserved.