Interface Executor

All Known Implementing Classes:
AbstractQueuingExecutor, RateLimitingExecutor, SameThreadExecutor

public interface Executor
Executor of submitted tasks with support for task priorities
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if executor is overloaded.
    void
    submit(Executor.Priority priority, Runnable runnable)
    Submits a task with a priority for execution.
  • Method Details

    • isOverloaded

      boolean isOverloaded()
      Checks if executor is overloaded. If returns true, then you should not try to submit any new tasks for a while.
      Returns:
      true - executor is overloaded
    • submit

      void submit(Executor.Priority priority, Runnable runnable)
      Submits a task with a priority for execution.
      Parameters:
      priority -
      runnable -