object wye
- Source
- wye.scala
- Alphabetic
- By Inheritance
- wye
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[L, R, O](pl: Process[Task, L], pr: Process[Task, R])(y0: Wye[L, R, O])(implicit S: Strategy): Process[Task, O]
Implementation of wye.
Implementation of wye.
- L
Type of left process element
- R
Type of right process elements
- O
Output type of resulting process
- pl
left process
- pr
right process
- y0
wye to control queueing and merging
- S
strategy, preferably executor service based
- returns
Process with merged elements.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
attachL[I0, I, I2, O](p1: Process1[I0, I])(y: Wye[I, I2, O]): Wye[I0, I2, O]
Transform the left input of the given
Wyeusing aProcess1. -
def
attachR[I, I1, I2, O](p: Process1[I1, I2])(w: Wye[I, I2, O]): Wye[I, I1, O]
Transform the right input of the given
Wyeusing aProcess1. -
def
boundedQueue[I](n: Int): Wye[Any, I, I]
A
Wyewhich emits values from its right branch, but allows up tonelements from the left branch to enqueue unanswered before blocking on the right branch. -
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
detach1L[I, I2, O](y: Wye[I, I2, O]): Wye[I, I2, O]
Transforms the wye so it will stop to listen on left side.
Transforms the wye so it will stop to listen on left side. Instead all requests on the left side are converted to termination with
Kill, and will terminate once the right side will terminate as well. TransformsAwaitBothtoAwaitRTransformsAwaitLto termination withEnd -
def
detach1R[I, I2, O](y: Wye[I, I2, O]): Wye[I, I2, O]
right alternative of detach1L
-
def
disconnectL[I, I2, O](cause: EarlyCause)(y: Wye[I, I2, O]): Wye[I, I2, O]
Signals to wye, that Left side terminated.
Signals to wye, that Left side terminated. Reason for termination is
cause. AnyLeftrequests will be terminated withcauseWye will be switched to listen only on Right side, that means Await(Both) is converted to Await(R) -
def
disconnectR[I, I2, O](cause: EarlyCause)(y: Wye[I, I2, O]): Wye[I, I2, O]
Right side alternative for
disconnectL -
def
dynamic[I, I2](f: (I) ⇒ Request, g: (I2) ⇒ Request): Wye[I, I2, ReceiveY[I, I2]]
After each input, dynamically determine whether to read from the left, right, or both, for the subsequent input, using the provided functions
fandg.After each input, dynamically determine whether to read from the left, right, or both, for the subsequent input, using the provided functions
fandg. The returnedWyebegins by reading from the left side and is left-biased--if a read of both branches returns aThese(x,y), it uses the signal generated byffor its next step. -
def
dynamic1[I](f: (I) ⇒ Request): Wye[I, I, I]
Invokes
dynamicwithI == I2, and produces a singleIoutput.Invokes
dynamicwithI == I2, and produces a singleIoutput. Output is left-biased: if aThese(i1,i2)is emitted, this is translated to anemitSeq(List(i1,i2)). -
def
echoLeft[A]: Wye[A, Any, A]
Continuous wye, that first reads from Left to get
A, Then whenAis not available it reads from R echoing anyAthat was received from Left Will halt once any of the sides halt -
def
either[I, I2]: Wye[I, I2, \/[I, I2]]
Nondeterminstic interleave of both inputs.
Nondeterminstic interleave of both inputs. Emits values whenever either of the inputs is available.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
feed1[I, I2, O](r: ReceiveY[I, I2])(w: Wye[I, I2, O]): Wye[I, I2, O]
Feed a single
ReceiveYvalue to aWye. -
def
feed1L[I, I2, O](i: I)(w: Wye[I, I2, O]): Wye[I, I2, O]
Feed a single value to the left branch of a
Wye. -
def
feed1R[I, I2, O](i2: I2)(w: Wye[I, I2, O]): Wye[I, I2, O]
Feed a single value to the right branch of a
Wye. -
def
feedL[I, I2, O](is: Seq[I])(y: Wye[I, I2, O]): Wye[I, I2, O]
Feed a sequence of inputs to the left side of a
Wye. -
def
feedR[I, I2, O](i2s: Seq[I2])(y: Wye[I, I2, O]): Wye[I, I2, O]
Feed a sequence of inputs to the right side of a
Wye. -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flip[I, I2, O](y: Wye[I, I2, O]): Wye[I2, I, O]
Convert right requests to left requests and vice versa.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
haltL[I, I2, O](cause: Cause)(y: Wye[I, I2, O]): Wye[I, I2, O]
Signals to wye that left side halted with
cause.Signals to wye that left side halted with
cause. Wye will be fed withHaltL(cause)and will disconnect from Left side. -
def
haltR[I, I2, O](cause: Cause)(y: Wye[I, I2, O]): Wye[I, I2, O]
Right alternative for
haltL -
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
interrupt[I]: Wye[Boolean, I, I]
Let through the right branch as long as the left branch is
false, listening asynchronously for the left branch to becometrue.Let through the right branch as long as the left branch is
false, listening asynchronously for the left branch to becometrue. This halts as soon as the right or left branch halts. -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
merge[I]: Wye[I, I, I]
Non-deterministic interleave of both inputs.
Non-deterministic interleave of both inputs. Emits values whenever either of the inputs is available.
Will terminate once both sides terminate.
-
def
mergeHaltBoth[I]: Wye[I, I, I]
Like
merge, but terminates whenever one side terminate. -
def
mergeHaltL[I]: Wye[I, I, I]
Like
merge, but terminates whenever left side terminates.Like
merge, but terminates whenever left side terminates. useflipto reverse this for the right side -
def
mergeHaltR[I]: Wye[I, I, I]
Like
merge, but terminates whenever right side terminates -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def receiveBoth[I, I2, O](rcv: (ReceiveY[I, I2]) ⇒ Wye[I, I2, O]): Wye[I, I2, O]
- def receiveBothOr[I, I2, O](fb: (EarlyCause) ⇒ Wye[I, I2, O])(rcv: (ReceiveY[I, I2]) ⇒ Wye[I, I2, O]): Wye[I, I2, O]
- def receiveL[I, I2, O](rcv: (I) ⇒ Wye[I, I2, O]): Wye[I, I2, O]
- def receiveLOr[I, I2, O](fb: (EarlyCause) ⇒ Wye[I, I2, O])(rcv: (I) ⇒ Wye[I, I2, O]): Wye[I, I2, O]
- def receiveR[I, I2, O](rcv: (I2) ⇒ Wye[I, I2, O]): Wye[I, I2, O]
- def receiveROr[I, I2, O](fb: (EarlyCause) ⇒ Wye[I, I2, O])(rcv: (I2) ⇒ Wye[I, I2, O]): Wye[I, I2, O]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
timedQueue[I](d: Duration, maxSize: Int = Int.MaxValue): Wye[Duration, I, I]
A
Wyewhich blocks on the right side when either a) the age of the oldest unanswered element from the left size exceeds the given duration, or b) the number of unanswered elements from the left exceedsmaxSize. -
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unboundedQueue[I]: Wye[Any, I, I]
Wyewhich repeatedly awaits both branches, emitting any values received from the right.Wyewhich repeatedly awaits both branches, emitting any values received from the right. Useful in conjunction withconnect, for instancesrc.connect(snk)(unboundedQueue) -
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
yip[I, I2]: Wye[I, I2, (I, I2)]
Nondeterministic version of
zipwhich requests both sides in parallel. -
def
yipL[I, I2](n: Int): Wye[I, I2, (I, I2)]
Left-biased, buffered version of
yip.Left-biased, buffered version of
yip. Allows up tonelements to enqueue on the left unanswered before requiring a response from the right. If buffer is empty, always reads from the left. -
def
yipWith[I, I2, O](f: (I, I2) ⇒ O): Wye[I, I2, O]
Nondeterministic version of
zipWithwhich requests both sides in parallel. -
def
yipWithL[I, O, O2](n: Int)(f: (I, O) ⇒ O2): Wye[I, O, O2]
Left-biased, buffered version of
yipWith.Left-biased, buffered version of
yipWith. Allows up tonelements to enqueue on the left unanswered before requiring a response from the right. If buffer is empty, always reads from the left. - object AwaitBoth
- object AwaitL
- object AwaitR
- object Request