Package tigase.pubsub.utils.executors
Class SameThreadExecutor
java.lang.Object
tigase.pubsub.utils.executors.SameThreadExecutor
- All Implemented Interfaces:
Executor
Implementation of Executor providing no limitations and no support for priorities.
Just executes submitted task on the same thread as they were submitted.
-
Nested Class Summary
Nested classes/interfaces inherited from interface tigase.pubsub.utils.executors.Executor
Executor.Priority
-
Constructor 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.
-
Constructor Details
-
SameThreadExecutor
public SameThreadExecutor()
-
-
Method Details
-
isOverloaded
public boolean isOverloaded()Description copied from interface:Executor
Checks if executor is overloaded. If returns true, then you should not try to submit any new tasks for a while.- Specified by:
isOverloaded
in interfaceExecutor
- Returns:
- true - executor is overloaded
-
submit
Description copied from interface:Executor
Submits a task with a priority for execution.
-