Class/Object

org.scaladebugger.api.utils

LoopingTaskRunner

Related Docs: object LoopingTaskRunner | package utils

Permalink

class LoopingTaskRunner extends AnyRef

Represents a queue of tasks that will be executed infinitely in order until removed.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LoopingTaskRunner
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LoopingTaskRunner(initialWorkers: Int = DefaultInitialWorkers, maxTaskWaitTime: (Long, TimeUnit) = DefaultMaxTaskWaitTime)

    Permalink

    initialWorkers

    The total number of works to use for this runner on startup (more can be added or removed)

    maxTaskWaitTime

    The maximum time to wait for a task to be pulled off of the queue before allowing other tasks to be run

Type Members

  1. type TaskId = String

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addTask[T](task: ⇒ T): TaskId

    Permalink

    Adds a task to be executed repeatedly (in a queue with other tasks).

    Adds a task to be executed repeatedly (in a queue with other tasks).

    T

    The return type of the task

    task

    The task to add

    returns

    The id of the queued task

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def getCurrentActiveWorkers: Int

    Permalink

    Retrieves the total actively-running workers.

    Retrieves the total actively-running workers.

    returns

    The total active workers at this point in time

  12. def getDesiredTotalWorkers: Int

    Permalink

    Retrieves the current desired total number of workers.

    Retrieves the current desired total number of workers.

    returns

    The desired total number of workers

  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def isRunning: Boolean

    Permalink

    Indicates whether or not the task runner is processing tasks.

    Indicates whether or not the task runner is processing tasks.

    returns

    True if it is running, otherwise false

  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def newExecutorService(): ExecutorService

    Permalink

    Creates a new executor service for use by the looping task runner.

    Creates a new executor service for use by the looping task runner.

    returns

    The new executor service instance

    Attributes
    protected
  18. def newLoopingTask(): Runnable

    Permalink

    Creates a new looping task to be executed.

    Creates a new looping task to be executed.

    Attributes
    protected
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. def removeTask(taskId: TaskId): Runnable

    Permalink

    Removes a task from the repeated execution.

    Removes a task from the repeated execution.

    taskId

    The id of the task to remove

    returns

    Task implementation that was removed

  22. def runNextTask(): Unit

    Permalink

    Executes next available task.

    Executes next available task.

    Attributes
    protected
  23. def setDesiredTotalWorkers(value: Int): Unit

    Permalink

    Sets the desired total number of workers to eventually be achieved by the task runner.

    Sets the desired total number of workers to eventually be achieved by the task runner.

    value

    The new desired total number of workers

  24. def start(): Unit

    Permalink

    Executing begins the process of executing queued up tasks.

  25. def stop(removeAllTasks: Boolean = true): Unit

    Permalink

    Prevents the runner from executing any more tasks.

    Prevents the runner from executing any more tasks.

    removeAllTasks

    If true, removes all tasks after being stopped

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped