Class SameThreadExecutor

java.lang.Object
tigase.pubsub.utils.executors.SameThreadExecutor
All Implemented Interfaces:
Executor

public class SameThreadExecutor extends Object implements Executor
Implementation of Executor providing no limitations and no support for priorities. Just executes submitted task on the same thread as they were submitted.
  • 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 interface Executor
      Returns:
      true - executor is overloaded
    • submit

      public void submit(Executor.Priority priority, Runnable runnable)
      Description copied from interface: Executor
      Submits a task with a priority for execution.
      Specified by:
      submit in interface Executor