Class

com.twitter.util

WitnessedEvent

Related Doc: package util

Permalink

class WitnessedEvent[T] extends Event[T] with Witness[T]

A Java analog of Event[A]().

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WitnessedEvent
  2. Witness
  3. Event
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new WitnessedEvent()

    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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def build[U >: T, That](implicit cbf: CanBuild[U, That]): Event[That]

    Permalink

    Progressively build a collection of events using the passed-in builder.

    Progressively build a collection of events using the passed-in builder. A value containing the current version of the collection is notified for each incoming event.

    Definition Classes
    Event
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def collect[U](f: PartialFunction[T, U]): Event[U]

    Permalink

    Build a new Event by applying the given function to each value observed.

    Build a new Event by applying the given function to each value observed. Event values for which the partial function f does not apply are dropped; other values are transformed by f.

    Definition Classes
    Event
  8. def comap[M](f: (M) ⇒ T): Witness[M]

    Permalink
    Definition Classes
    Witness
  9. def dedup: Event[T]

    Permalink

    Builds a new Event by keeping only the Events where the previous and current values are not == to each other.

    Builds a new Event by keeping only the Events where the previous and current values are not == to each other.

    Definition Classes
    Event
  10. def dedupWith(eq: (T, T) ⇒ Boolean): Event[T]

    Permalink

    Build a new Event by keeping only those Event values where the equality predicate eq applied to the current and new values does not match.

    Build a new Event by keeping only those Event values where the equality predicate eq applied to the current and new values does not match.

    Definition Classes
    Event
  11. def diff[CC[_], U](implicit arg0: Diffable[CC], toCC: <:<[T, CC[U]]): Event[Diff[CC, U]]

    Permalink

    The Event that stores the difference between successive updates to the parent event.

    The Event that stores the difference between successive updates to the parent event. This can be used to perform incremental computation on large data structures.

    Definition Classes
    Event
  12. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. def filter(p: (T) ⇒ Boolean): Event[T]

    Permalink

    Build a new Event by keeping only those Event values that match the predicate p.

    Build a new Event by keeping only those Event values that match the predicate p.

    Definition Classes
    Event
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def foldLeft[U](z: U)(f: (U, T) ⇒ U): Event[U]

    Permalink

    Build a new Event by incrementally accumulating over events, starting with value z.

    Build a new Event by incrementally accumulating over events, starting with value z. Each intermediate aggregate is notified to the derived event.

    Definition Classes
    Event
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  20. def joinLast[U](other: Event[U]): Event[(T, U)]

    Permalink

    Join two events into a new Event which notifies a tuple of the last value in each underlying event.

    Join two events into a new Event which notifies a tuple of the last value in each underlying event.

    Definition Classes
    Event
  21. def map[U](f: (T) ⇒ U): Event[U]

    Permalink

    Build a new Event by transforming each new event value with f.

    Build a new Event by transforming each new event value with f.

    Definition Classes
    Event
  22. def merge[U >: T](other: Event[U]): Event[U]

    Permalink

    Merge two events; the resulting event interleaves events from this and other.

    Merge two events; the resulting event interleaves events from this and other.

    Definition Classes
    Event
  23. def mergeMap[U](f: (T) ⇒ Event[U]): Event[U]

    Permalink

    The Event which merges the events resulting from f applied to each element in this Event.

    The Event which merges the events resulting from f applied to each element in this Event.

    Definition Classes
    Event
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. def notify(note: T): Unit

    Permalink

    Notify this Witness with the given note.

    Notify this Witness with the given note.

    Definition Classes
    WitnessedEventWitness
  26. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  28. def patch[CC[_], U](implicit arg0: Diffable[CC], ev: <:<[T, Diff[CC, U]]): Event[CC[U]]

    Permalink

    Patch up an Event of differences (like those produced by Event.diff) into an Event that reflects the current version of a data structure.

    Patch up an Event of differences (like those produced by Event.diff) into an Event that reflects the current version of a data structure. That is: (event: Event[CC[T]]).diff.patch is equivalent to event

    Definition Classes
    Event
  29. def register(s: Witness[T]): Closable

    Permalink

    Register the given Witness to this Event.

    Register the given Witness to this Event. Witnesses are notified of new values until it is deregistered by the returned Closable.

    Definition Classes
    WitnessedEventEvent
  30. final def respond(s: (T) ⇒ Unit): Closable

    Permalink

    Observe this event with function s.

    Observe this event with function s. Equivalent to register(Witness(s)).

    Definition Classes
    Event
  31. def select[U](other: Event[U]): Event[Either[T, U]]

    Permalink

    Merge two Events of different types.

    Merge two Events of different types.

    Definition Classes
    Event
  32. def sliding(n: Int): Event[Seq[T]]

    Permalink

    Build a new Event representing a sliding window of at-most n.

    Build a new Event representing a sliding window of at-most n. Each event notified by the parent are added to a queue of size at-most n. This queue is in turn notified to register of the returned event.

    Definition Classes
    Event
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def take(howmany: Int): Event[T]

    Permalink

    An event which consists of the first howmany values in the parent Event.

    An event which consists of the first howmany values in the parent Event.

    Definition Classes
    Event
  35. def toFuture(): Future[T]

    Permalink

    A Future which is satisfied by the first value observed.

    A Future which is satisfied by the first value observed.

    Definition Classes
    Event
  36. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. def zip[U](other: Event[U]): Event[(T, U)]

    Permalink

    Merge two event streams in lock-step, combining corresponding event values.

    Merge two event streams in lock-step, combining corresponding event values.

    Definition Classes
    Event
    Note

    This can be dangerous! Since the implementation needs to queue outstanding Event-values from the slower producer, if one Event outpaces another, this queue can grow in an unbounded fashion.

Inherited from Witness[T]

Inherited from Event[T]

Inherited from AnyRef

Inherited from Any

Ungrouped