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 booleanisOverloaded()Checks if executor is overloaded.voidsubmit(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: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
public void submit(Executor.Priority priority, java.lang.Runnable runnable)
Description copied from interface:ExecutorSubmits a task with a priority for execution.
-
-