Package tigase.pubsub.utils.executors
Interface Executor
-
- All Known Implementing Classes:
AbstractQueuingExecutor,RateLimitingExecutor,SameThreadExecutor
public interface ExecutorExecutor of submitted tasks with support for task priorities
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classExecutor.Priority
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisOverloaded()Checks if executor is overloaded.voidsubmit(Executor.Priority priority, java.lang.Runnable runnable)Submits a task with a priority for execution.
-
-
-
Method Detail
-
isOverloaded
boolean isOverloaded()
Checks if executor is overloaded. If returns true, then you should not try to submit any new tasks for a while.- Returns:
- true - executor is overloaded
-
submit
void submit(Executor.Priority priority, java.lang.Runnable runnable)
Submits a task with a priority for execution.- Parameters:
priority-runnable-
-
-