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
Nested Classes Modifier and Type Interface Description static class
Executor.Priority
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isOverloaded()
Checks if executor is overloaded.void
submit(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
-
-
-