Package tigase.pubsub.utils.executors
Interface Executor
- All Known Implementing Classes:
AbstractQueuingExecutor
,RateLimitingExecutor
,SameThreadExecutor
public interface Executor
Executor of submitted tasks with support for task priorities
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if executor is overloaded.void
submit
(Executor.Priority priority, Runnable runnable) Submits a task with a priority for execution.
-
Method Details
-
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
Submits a task with a priority for execution.- Parameters:
priority
-runnable
-
-