Packages

class OneTimeChannel[T] extends Channel[T]

channel, in which only one message can be written, after which it is automatically closed

Writer is not waiting for reader to start.

Self Type
OneTimeChannel[T]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OneTimeChannel
  2. Channel
  3. CloseableInput
  4. DoneProvider
  5. InputOutput
  6. Output
  7. Input
  8. GopherAPIProvider
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new OneTimeChannel(api: GopherAPI)

Type Members

  1. class Filtered extends Channel.Filtered with Channel[A] with DoneSignalDelegate[A]
    Definition Classes
    Channel
  2. trait DoneSignalDelegate [T] extends CloseableInput[T]
    Definition Classes
    CloseableInput
  3. class FutureMapped [B] extends Input[B]
    Definition Classes
    Input
  4. class Mapped [B] extends Input[B]
    Definition Classes
    Input
  5. case class Read (value: A) extends Product with Serializable
    Definition Classes
    Input
  6. type <~ = T
    Definition Classes
    Input
  7. type done = Unit
    Definition Classes
    DoneProvider
  8. type read = T
    Definition Classes
    Input
  9. type write = T
    Definition Classes
    Output
  10. type writeExp[X] = T
    Definition Classes
    Output
  11. type ~> = T
    Definition Classes
    Output

Value Members

  1. macro def !(a: T): Unit

    shortcut for blocking write.

    shortcut for blocking write.

    Definition Classes
    Output
  2. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  3. final def ##(): Int
    Definition Classes
    AnyRef → Any
  4. macro def <~(a: T): Output[T]

    shortcut for blocking write.

    shortcut for blocking write.

    Definition Classes
    Output
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. macro def ?: T

    synonym for read.

    synonym for read.

    Definition Classes
    Input
  7. macro def afold[S, B](s0: S)(f: (S, T) ⇒ S): Future[S]

    async incarnation of fold.

    async incarnation of fold. Fold return future, which successed when channel is closed. Operations withing fold applyed on result on each other, starting with s0. val fsum = ch.afold(0){ (s, n) => s+n } Here in fsum will be future with value: sum of all elements in channel until one has been closed.

    Definition Classes
    Input
  8. def afoldAsync[S, B](s0: S)(f: (S, T) ⇒ Future[S])(implicit ec: ExecutionContext): Future[S]
    Definition Classes
    Input
  9. def afoldSync[S, B](s0: S)(f: (S, T) ⇒ S): Future[S]
    Definition Classes
    Input
  10. macro def aforeach(f: (T) ⇒ Unit): Future[Unit]
    Definition Classes
    Input
  11. def amap[B](g: (T) ⇒ Future[B]): Input[B]
    Definition Classes
    Input
  12. val api: GopherAPI
    Definition Classes
    OneTimeChannelOutputInputGopherAPIProvider
  13. def append(other: Input[T]): Input[T]

    when the first channel is exhaused, read from second.

    when the first channel is exhaused, read from second.

    Definition Classes
    Input
  14. def applyDone[B](cr: ContRead[Unit, B]): Unit
    Attributes
    protected
    Definition Classes
    CloseableInput
  15. def aread: Future[T]

    async version of read.

    async version of read. Immediatly return future, which will contains result of read or failur with StreamClosedException in case of stream is closed.

    Definition Classes
    Input
  16. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  17. def async: AnyRef { ... /* 3 definitions in type refinement */ }
    Definition Classes
    Input
  18. def atake(n: Int): Future[IndexedSeq[T]]

    return feature which contains sequence from first n elements.

    return feature which contains sequence from first n elements.

    Definition Classes
    Input
  19. def awrite(a: T): Future[T]
    Definition Classes
    Output
  20. def awriteAll[C <: Iterable[T]](c: C): Future[Unit]
    Definition Classes
    Output
  21. def cbread[B](f: (ContRead[T, B]) ⇒ Option[(In[T]) ⇒ Future[Continuated[B]]], ft: FlowTermination[B]): Unit

    apply f, when input will be ready and send result to API processor

    apply f, when input will be ready and send result to API processor

    Definition Classes
    OneTimeChannelInput
  22. def cbwrite[B](f: (ContWrite[T, B]) ⇒ Option[(T, Future[Continuated[B]])], ft: FlowTermination[B]): Unit

    apply f and send result to channels processor.

    apply f and send result to channels processor.

    Definition Classes
    OneTimeChannelOutput
  23. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. def close(): Unit
    Definition Classes
    OneTimeChannelChannel
  25. lazy val closeless: Input[T]

    returns

    Input without close event: i.e. reading from closeless channel after channel close will wait forever instead throwing CloseChannelException

    Definition Classes
    Input
  26. val done: Input[Unit]
    Definition Classes
    OneTimeChannelDoneProvider
  27. def dup(): (Input[T], Input[T])

    duplicate input

    duplicate input

    Definition Classes
    Input
  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  30. def filter(p: (T) ⇒ Boolean): Channel[T]
    Definition Classes
    ChannelCloseableInputInput
  31. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  32. def flatFold(fun: (Input[T], T) ⇒ Input[T]): Input[T]
    Definition Classes
    Input
  33. def flatMap[B](g: (T) ⇒ Input[B]): Input[B]
    Definition Classes
    Input
  34. def flatMapOp[B](g: (T) ⇒ Input[B])(op: (Input[B], Input[B]) ⇒ Input[B]): Input[B]
    Definition Classes
    Input
  35. macro def fold[S, B](s0: S)(f: (S, T) ⇒ S): S

    fold opeations, available inside async bloc.

    fold opeations, available inside async bloc. go { val sum = ch.fold(0){ (s,n) => s+n } }

    Definition Classes
    Input
  36. macro def foreach(f: (T) ⇒ Unit): Unit

    run f each time when new object is arrived.

    run f each time when new object is arrived. Ended when input closes.

    must be inside go/async/action block.

    Definition Classes
    Input
  37. def foreachAsync(f: (T) ⇒ Future[Unit])(implicit ec: ExecutionContext): Future[Unit]
    Definition Classes
    Input
  38. def foreachSync(f: (T) ⇒ Unit): Future[Unit]
    Definition Classes
    Input
  39. def future: Future[T]
  40. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  41. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  42. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  43. def map[B](g: (T) ⇒ B): CloseableInput[B]
    Definition Classes
    CloseableInputInput
  44. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  45. final def notify(): Unit
    Definition Classes
    AnyRef
  46. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  47. def or(other: Input[T]): Input[T]

    synonim for non-deteremenistics choice.

    synonim for non-deteremenistics choice.

    Definition Classes
    Input
  48. def pam[B](g: (B) ⇒ T): Output[B]

    alias for premap

    alias for premap

    Definition Classes
    Output
  49. def premap[C](g: (C) ⇒ T): Output[C]

    before passing value to output, apply g to one.

    before passing value to output, apply g to one.

    Definition Classes
    Output
  50. def prepend(a: T): Input[T]
    Definition Classes
    Input
  51. def promise: Promise[T]
  52. macro def read: T

    read object from channel.

    read object from channel. Must be situated inside async/go/action block.

    Definition Classes
    Input
  53. def seq: AnyRef { def flatMap[B](g: T => gopher.channels.Input[B]): gopher.channels.Input[B] }
    Definition Classes
    Input
  54. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  55. def toString(): String
    Definition Classes
    AnyRef → Any
  56. def unfold[S](s: S)(f: (S) ⇒ (S, T)): Unit
    Definition Classes
    Output
  57. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. def withFilter(p: (T) ⇒ Boolean): Input[T]
    Definition Classes
    Input
  61. def withInputTimeouts(timeout: FiniteDuration): (Input[T], Input[FiniteDuration])

    return pair of inputs (ready, timeouts), such that when you read from ready you receive element from this and if during reading you wait more than specified timeout, than timeout message is appear in timeouts

    return pair of inputs (ready, timeouts), such that when you read from ready you receive element from this and if during reading you wait more than specified timeout, than timeout message is appear in timeouts

    val (inReady, inTimeouts) = in withInputTimeouts (10 seconds) select.forever { case x: inReady.read => Console.println(s"received value ${value}") case x: inTimeouts.read => Console.println(s"timeout occured") }

    Definition Classes
    Input
  62. def withOutputTimeouts(timeout: FiniteDuration): (Output[T], Input[FiniteDuration])

    provide pair from Output and Input (ready, timeouts) such that writing to ready will case writing to output and if it was not completed during timeout than appropriative duration will be availabe in timeouts input.

    provide pair from Output and Input (ready, timeouts) such that writing to ready will case writing to output and if it was not completed during timeout than appropriative duration will be availabe in timeouts input.

    val (chReady, chTimeouts) = ch withOutputTimeouts (5 seconds) select.forever { case x: chReady.write if (x==somethingToWrite) => Console.println(s" ${x} send") case t: chTimeouts.read => Console.println(s"timeout during writing") }

    Definition Classes
    Output
  63. macro def write(a: T): T

    'blocking' write of 'a' to channel.

    'blocking' write of 'a' to channel. Note, that this method can be called only inside 'go' or 'async' blocks.

    Definition Classes
    Output
  64. macro def writeAll[C <: Iterable[T]](it: C): Unit
    Definition Classes
    Output
  65. def zip[B](x: Input[B]): Input[(T, B)]
    Definition Classes
    Input
  66. def zip[B](x: Iterable[B]): Input[(T, B)]
    Definition Classes
    Input
  67. def |(other: Input[T]): Input[T]

    return input merged with 'other'.

    return input merged with 'other'. (i.e. non-determenistics choice)

    Definition Classes
    Input

Inherited from Channel[T]

Inherited from CloseableInput[T]

Inherited from DoneProvider[Unit]

Inherited from InputOutput[T]

Inherited from Output[T]

Inherited from Input[T]

Inherited from GopherAPIProvider

Inherited from AnyRef

Inherited from Any

Ungrouped