Package

com.twitter.algebird

util

Permalink

package util

Visibility
  1. Public
  2. All

Type Members

  1. case class PromiseLink[V](promise: Promise[V], value: V) extends Product with Serializable

    Permalink

    This class allows code to depends on the data that a value will be combined with, fulfilling the Promise with the value just before the value is added in.

  2. class PromiseLinkMonoid[V] extends Monoid[PromiseLink[V]]

    Permalink

    This Monoid allows code to depend on the result of computation asynchronously.

    This Monoid allows code to depend on the result of computation asynchronously. This is a slightly less general version of the TunnelMonoid. See the documentation for TunnelMonoid for general motivation. NOTE: the Promise will be fulfilled with the value just before the PromiseLink is calculated.

  3. case class Tunnel[V](future: Future[V], promise: Promise[V]) extends Product with Serializable

    Permalink

    The tunnel class represents a piece of computation that depends on the fulfilment of a promise.

    The tunnel class represents a piece of computation that depends on the fulfilment of a promise. IMPORTANT: see apply, but Tunnels are mutable, and can only be fulfilled once. They are generally not reusable. Reusing a Tunnel in computation by a TunnelMonoid will cause the promise to be fulfilled more than once which will most likely lead to errors.

  4. class TunnelMonoid[V] extends Monoid[Tunnel[V]]

    Permalink

    This Monoid allows code to depends on the results of asynchronous computation.

    This Monoid allows code to depends on the results of asynchronous computation. It is relatively common to have code which takes a Monoid and elements, but applies the computation in an opaque way (a cache, for example). This allows the code handing over the elements (in this case, Tunnel objects) to depend on the result of the Monoid's computation. Note that this code does not depend on any particular Monoid -- that dependency is strictly when the Tunnel objects are created. This is the async analogue of Function1Monoid.

Value Members

  1. object PromiseLink extends Serializable

    Permalink
  2. object Tunnel extends Serializable

    Permalink
  3. object UtilAlgebras

    Permalink
  4. package summer

    Permalink

Ungrouped