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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if executor is overloaded.voidsubmit(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:ExecutorChecks if executor is overloaded. If returns true, then you should not try to submit any new tasks for a while.- Specified by:
isOverloadedin interfaceExecutor- Returns:
- true - executor is overloaded
-
submit
Description copied from interface:ExecutorSubmits a task with a priority for execution.
-