PriorityTaskRunner

fm.common.PriorityTaskRunner
See thePriorityTaskRunner companion object
final class PriorityTaskRunner(val name: String, val coreThreads: Int, val maxThreads: Int, val queueSize: Int) extends TaskRunnerBase

Similar to a TaskRunner but allows you to pass in a priority value such that lower priority tasks will execute before higher priority tasks.

Attributes

Companion:
object
Graph
Supertypes
trait Logging
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

final def execute(priority: Long)(f: => Unit): Unit
final def submit[T](priority: Long)(f: => T): Future[T]
final def tryExecute(priority: Long)(f: => Unit): Boolean

Attempt to submit this job to the queue. Returns true if successful or false if the queue is full

Attempt to submit this job to the queue. Returns true if successful or false if the queue is full

Attributes

final def trySubmit[T](priority: Long)(f: => T): Option[Future[T]]

Attempt to submit this job to the queue. Returns Some(...) if successful or None if the queue is full

Attempt to submit this job to the queue. Returns Some(...) if successful or None if the queue is full

Attributes

Inherited methods

final def abort(maxWaitSeconds: Int): Unit

Perform an unclean shutdown of the executor only waiting up to maxWaitSeconds

Perform an unclean shutdown of the executor only waiting up to maxWaitSeconds

Attributes

Inherited from:
TaskRunnerBase
final def close(): Unit

Attributes

Inherited from:
TaskRunnerBase
override def finalize(): Unit

Called by the garbage collector on the receiver object when there are no more references to the object.

Called by the garbage collector on the receiver object when there are no more references to the object.

The details of when and if the finalize method is invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.

Attributes

Note:

not specified by SLS as a member of AnyRef

Definition Classes
TaskRunnerBase -> Object
Inherited from:
TaskRunnerBase
final def scoped(f: PriorityTaskRunner => Unit): Unit

Attributes

Inherited from:
TaskRunnerBase
final def shutdown(silent: Boolean, warnIntervalSeconds: Int): Unit

Perform a "clean" shutdown of the executor by waiting for all tasks to finish

Perform a "clean" shutdown of the executor by waiting for all tasks to finish

Attributes

Inherited from:
TaskRunnerBase
final def size: Int

Attributes

Inherited from:
TaskRunnerBase

Concrete fields

val coreThreads: Int
val maxThreads: Int
val name: String
val queueSize: Int