Packages

final class FutureQueue[A] extends AnyRef

A queue which returns Futures for elements which may not have been enqueued yet.

A

the type of the contents of this queue

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def ++=(xs: TraversableOnce[A]): FutureQueue.this.type

    Append elements to this queue.

    Append elements to this queue.

    xs

    the elements to append

    returns

    this queue

  4. def +=(a: A): FutureQueue.this.type

    Append an element to this queue.

    Append an element to this queue.

    a

    the element to append

    returns

    this queue

  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def dequeue(): Future[A]

    Returns a Future containing the next element, and removes that element from this queue.

    Returns a Future containing the next element, and removes that element from this queue. If this queue contains no elements, the Future will be completed when more elements are added to the queue; an element is said to be "promised" by that Future. Futures returned by this method are completed by enqueued elements in the order that the elements were promised.

    returns

    Returns a Future (eventually) containing the next element in this queue

  9. def drainContinually[B](f: (A) ⇒ B)(implicit executor: ExecutionContext): Unit

    Dequeues elements from this queue as they are added, and applies them to the specified function.

    Dequeues elements from this queue as they are added, and applies them to the specified function.

    One SHOULD NOT dequeue elements from this queue after calling this method or drainContinuallyTo; doing so will result in only some elements being applied to the specified function, in an inconsistent fashion. For the same reason, neither this method nor drainContinuallyTo (nor FutureQueue.aggregate with this as an argument) should be invoked after calling this method.

    B

    only used to accept any return type from the callback function

    f

    a function executed with each element added to this queue (forever); its return value is ignored

    executor

    the ExecutionContext used to execute the callbacks

  10. def drainContinuallyTo[B >: A](other: FutureQueue[B])(implicit executor: ExecutionContext): Unit

    Dequeues elements from this queue as they are added, and enqueues them to the specified FutureQueue.

    Dequeues elements from this queue as they are added, and enqueues them to the specified FutureQueue.

    One SHOULD NOT dequeue elements from this queue after calling this method or drainContinually; doing so will result in only some elements being enqueued to the specified queue, in an inconsistent fashion. For the same reason, neither this method nor drainContinually (nor FutureQueue.aggregate with this as an argument) should be invoked after calling this method.

    B

    the type of the elements in the other queue

    other

    the queue to which to enqueue elements added to this queue

    executor

    the ExecutionContext used to enqueue elements to the other queue

    Annotations
    @throws( ... )
    Exceptions thrown

    IllegalArgumentException if the specified FutureQueue is this

  11. def enqueue(xs: A*): Unit

    Append elements to this queue.

    Append elements to this queue.

    xs

    the elements to append

  12. def enqueue(a: A): Unit

    Append an element to this queue.

    Append an element to this queue.

    a

    the element to append

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(other: Any): Boolean

    Returns true if this and other are equal.

    Returns true if this and other are equal.

    this and other are equal only if other is a FutureQueue, and the FutureQueues are equal. Two FutureQueues are equal if they have the same queued elements, and no promised elements.

    other

    the other object

    returns

    true if this and other are equal; false otherwise

    Definition Classes
    FutureQueue → AnyRef → Any
  15. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int
    Definition Classes
    FutureQueue → AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  22. def promiseCount: Int

    Returns the number of elements promised by dequeue which have not yet been completed.

    Returns the number of elements promised by dequeue which have not yet been completed.

    returns

    the number of promised elements in this queue

  23. def queued: Queue[A]

    Returns the elements currently in this queue.

    Returns the elements currently in this queue. Returns an empty Queue if there are no elements or promised elements in this queue.

    returns

    the elements currently in the queue

  24. def size: Int

    Returns the size of this queue.

    Returns the size of this queue. Returns a negative number if there are no elements queued and there are promised elements which are not completed.

    returns

    the size of this queue

  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    FutureQueue → AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def drainToContinually[B >: A](other: FutureQueue[B])(implicit executor: ExecutionContext): Unit

    Annotations
    @deprecated
    Deprecated

    (Since version 1.2.0) use drainContinuallyTo instead

    See also

    drainContinuallyTo

  2. def enqueue(xs: TraversableOnce[A]): Unit

    Append elements to this queue.

    Append elements to this queue.

    xs

    the elements to append

    Annotations
    @deprecated
    Deprecated

    (Since version 1.2.0) use enqueue(A*) or ++= instead

Inherited from AnyRef

Inherited from Any

Ungrouped