Package tigase.pubsub.utils.executors
Class SameThreadExecutor
- java.lang.Object
-
- tigase.pubsub.utils.executors.SameThreadExecutor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface tigase.pubsub.utils.executors.Executor
Executor.Priority
-
-
Constructor Summary
Constructors Constructor Description SameThreadExecutor()
-
Method Summary
All Methods Instance Methods Concrete 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
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
public void submit(Executor.Priority priority, java.lang.Runnable runnable)
Description copied from interface:Executor
Submits a task with a priority for execution.
-
-