trait QueueObject[T] extends Object
Queue Object - A queue of tasks for the worker function to complete.
- Annotations
- @RawJSType() @native()
- See also
- Alphabetic
- By Inheritance
- QueueObject
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
buffer: Int
A minimum threshold buffer in order to say that the queue is unsaturated.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
concurrency: Int
an integer for determining how many worker functions should be run in parallel.
an integer for determining how many worker functions should be run in parallel. This property can be changed after a queue is created to alter the concurrency on-the-fly.
-
val
drain: Function
A callback that is called when the last item from the queue has returned from the worker.
-
val
empty: Function
A callback that is called when the last item from the queue is given to a worker.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
error: Function
A callback that is called when a task errors.
A callback that is called when a task errors. Has the signature function(error, task).
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
idle(): Boolean
- returns
false if there are items waiting or being processed, or true if not.
queue.idle()
Example: -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
def
kill(): Unit
A function that removes the drain callback and empties remaining tasks from the queue forcing it to go idle.
A function that removes the drain callback and empties remaining tasks from the queue forcing it to go idle.
queue.kill()
Example: -
def
length(): Int
- returns
the number of items waiting to be processed.
queue.length()
Example: -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
pause(): Unit
A function that pauses the processing of tasks until resume() is called.
A function that pauses the processing of tasks until resume() is called.
queue.pause()
Example: -
def
paused: Boolean
A boolean for determining whether the queue is in a paused state.
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
push(task: |[T, Array[T]], callback: Function = null): Unit
add a new task to the queue.
add a new task to the queue. Calls callback once the worker has finished processing the task. Instead of a single task, a tasks array can be submitted. The respective callback is used for every task in the list.
queue.push(task, [callback])
Example: -
def
resume(): Unit
A function that resumes the processing of queued tasks when the queue is paused.
A function that resumes the processing of queued tasks when the queue is paused.
queue.resume()
Example: -
def
running(): Boolean
- returns
the number of items currently being processed.
queue.running()
Example: -
val
saturated: Function
A callback that is called when the number of running workers hits the concurrency limit, and further tasks will be queued.
-
def
started: Boolean
A boolean indicating whether or not any items have been pushed and processed by the queue.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
val
unsaturated: Function
A callback that is called when the number of running workers is less than the concurrency & buffer limits, and further tasks will not be queued.
-
def
unshift(task: T, callback: Function = null): Unit
Add a new task to the front of the queue.sbt pu
Add a new task to the front of the queue.sbt pu
queue.unshift(task, [callback])
Example: -
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
workersList(): Array[T]
- returns
the array of items currently being processed.
queue.workersList()
Example: