net.sf.asyncobjects.asyncscala.stream

RichStream

class RichStream [T] extends AnyRef

The stream wrapper. Note that most streams are created here in unexported form. To make reference to the safe use {link #export} operation.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. RichStream
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RichStream (stream: AStream[T])

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def allFor [R] (body: (T) ⇒ Promise[R]): AllForStreamBuilder[T, R]

    Start building generic aAllFor loop over the stream

    Start building generic aAllFor loop over the stream

    body

    the body that will be executed as soon as value is available, not waiting for the next value

    returns

    the aAllFor loop builder

  7. def allForList [R] (body: (T) ⇒ Promise[R]): Promise[List[R]]

    Generic aAllForList loop over the stream

    Generic aAllForList loop over the stream

    body

    the body that will be executed as soon as value is available, not waiting for the next value

    returns

    a promise that resolves to list of returned bodies

  8. def allForUnit [R] (body: (T) ⇒ Promise[R]): Promise[Unit]

    Generic aAllForUnit loop over the stream

    Generic aAllForUnit loop over the stream

    body

    the body that will be executed as soon as value is available, not waiting for the next value

    returns

    a promise that resolves to unit when all bodies completed

  9. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  10. def buffer (n: Int): FilteredStreamBase[T, T] { ... /* 6 definitions in type refinement */ }

    The buffered stream that eagerly gets n elements from the underlying stream and maintain that amount while it is possible.

    The buffered stream that eagerly gets n elements from the underlying stream and maintain that amount while it is possible. The elements are fetched in background.

    n

    amount of elements to buffer

    returns

    the buffered stream

  11. def changed : AStream[T]

    returns

    the stream that produces only changed values.

  12. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def consume (body: (T) ⇒ Promise[Boolean]): Promise[Unit]

    Consume the stream until body returns false or end of stream is reached

    Consume the stream until body returns false or end of stream is reached

    body

    the body that consumes the stream

    returns

    the promise that resolves when eof reached

  14. def consumeAndClose (body: (T) ⇒ Promise[Boolean]): Promise[Unit]

    Consume the stream until body returns false or end of stream is reached

    Consume the stream until body returns false or end of stream is reached

    body

    the body that consumes the stream

    returns

    the promise that resolves when eof reached

  15. def copyTo [R <: T] (thunk: AThunk[R]): Promise[Long]

    Forward stream to a thunk

    Forward stream to a thunk

    thunk

    the destination thunk

    returns

    a promise that resolves to the number of copied elements

  16. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  17. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def export : AStream[T]

    Use this operation if you want to pass the resulting composite stream around.

    Use this operation if you want to pass the resulting composite stream around. If you need the transformed stream only for local usage you do not need to export it.

    returns

    exported stream

  19. def filter [S] (subclass: Class[S]): AStream[S]

    Filter stream by type

    Filter stream by type

    returns

    Filter by boolean criteria

  20. def filter (criteria: (T) ⇒ Boolean): AStream[T]

    Filter stream by predicate

    Filter stream by predicate

    returns

    Filter by boolean criteria

  21. def filteredStream [R] (filter: (AStream[T]) ⇒ Promise[Option[R]]): AStream[R]

    Filter stream by predicate

    Filter stream by predicate

    returns

    Filter by boolean criteria

  22. def filteredStreamI [R] (filter: ⇒ Promise[Option[R]]): AStream[R]

    Filter stream by predicate

    Filter stream by predicate

    returns

    Filter by boolean criteria

  23. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  25. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  26. def head (n: Int): AStream[T]

    returns

    stream that allows reading only first n elements, after that none is returned.

  27. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  28. def map [S] (f: (T) ⇒ Promise[S]): AStream[S]

    Map elements

    Map elements

    f

    the function that maps element (asynchronously)

    returns

    mapped stream

  29. def mapWrap [S] (f: (T) ⇒ S): AStream[S]

    Map elements

    Map elements

    f

    the function that maps element (synchronously)

    returns

    mapped stream

  30. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  31. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  32. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  33. def seqFold [R] (start: R)(f: (R, T) ⇒ Promise[R]): Promise[R]

    Left fold the list with immediate function

    Left fold the list with immediate function

    start

    the initial value for the folding

    f

    the the folding function

    returns

    the rest of the stream converted to list buffer

  34. def seqFoldW [R] (start: R)(f: (R, T) ⇒ R): Promise[R]

    Left fold the list with immediate function

    Left fold the list with immediate function

    start

    the initial value for the folding

    f

    the the folding function

    returns

    the rest of the stream converted to list buffer

  35. def seqFor [R] (body: (T) ⇒ Promise[R]): SeqLoopBuilder[T, R]

    Generic aSeqFor like loop form

    Generic aSeqFor like loop form

    body

    the body of the loop

    returns

    the loop builder

  36. def seqForUnit [X] (body: (T) ⇒ Promise[X]): Promise[Unit]

    Iterate over the entire stream

    Iterate over the entire stream

    body

    the iteration body

    returns

    promise that resolves when iteration finishes

  37. val stream : AStream[T]

  38. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  39. def toList : Promise[List[T]]

    returns

    the rest of the stream converted to list

  40. def toListBuffer : Promise[ListBuffer[T]]

    returns

    the rest of the stream converted to list buffer

  41. def toString (): String

    Definition Classes
    AnyRef → Any
  42. def trottle (timer: ATimer, delay: Long): AStream[T]

    The result stream gets value from underlying stream, then waits for delay and tries to get a new value, if new value is got, the timer is reset.

    The result stream gets value from underlying stream, then waits for delay and tries to get a new value, if new value is got, the timer is reset. If none is returned by underlying stream, it is immediately returned. Note that the streams eagerly reads the values from underlying stream, even when there is no active next request. So all values except the freshest one are discarded.

    timer

    a timer service to use

    delay

    a delay for the value

    returns

    a stream of values

  43. implicit def upcast [R >: T] : AStream[R]

    returns

    safely upcasted stream

    Attributes
    implicit
  44. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any