|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PipelineContext
This base trait of each pipeline’s context provides optimized facilities for generating single commands or events (i.e. the fast common case of 1:1 message transformations).
IMPORTANT NOTICE:
A PipelineContext MUST NOT be shared between multiple pipelines, it contains mutable state without synchronization. You have been warned!
see AbstractPipelineContext for a default implementation (Java)
Method Summary | ||
---|---|---|
scala.collection.mutable.WrappedArray<scala.runtime.Nothing$> |
cmd()
INTERNAL API: do not touch! |
|
java.lang.Object[] |
cmdHolder()
INTERNAL API: do not touch! |
|
|
dealias(scala.collection.Iterable<scala.util.Either<Evt,Cmd>> msg)
INTERNAL API: Dealias a possibly optimized return value such that it can be safely used; this is never needed when only using public API. |
|
scala.collection.mutable.WrappedArray<scala.runtime.Nothing$> |
evt()
INTERNAL API: do not touch! |
|
java.lang.Object[] |
evtHolder()
INTERNAL API: do not touch! |
|
|
nothing()
A shared (and shareable) instance of an empty Iterable[Either[EvtAbove, CmdBelow} . |
|
|
singleCommand(Cmd cmd)
Scala API: Wrap a single command for efficient return to the pipeline’s machinery. |
|
|
singleEvent(Evt evt)
Scala API: Wrap a single event for efficient return to the pipeline’s machinery. |
Method Detail |
---|
java.lang.Object[] cmdHolder()
java.lang.Object[] evtHolder()
scala.collection.mutable.WrappedArray<scala.runtime.Nothing$> cmd()
scala.collection.mutable.WrappedArray<scala.runtime.Nothing$> evt()
<Cmd,Evt> scala.collection.Iterable<scala.util.Either<Evt,Cmd>> singleCommand(Cmd cmd)
Right
and an Iterable
by reusing
one such instance within the PipelineContext, hence it can be used ONLY ONCE by
each pipeline stage. Prototypic and safe usage looks like this:
override val commandPipeline = { cmd =>
val myResult = ...
ctx.singleCommand(myResult)
}
see AbstractPipePair for the Java API
<Cmd,Evt> scala.collection.Iterable<scala.util.Either<Evt,Cmd>> singleEvent(Evt evt)
Left
and an Iterable
by reusing
one such instance within the context, hence it can be used ONLY ONCE by
each pipeline stage. Prototypic and safe usage looks like this:
override val eventPipeline = { cmd =>
val myResult = ...
ctx.singleEvent(myResult)
}
see AbstractPipePair for the Java API
<Cmd,Evt> scala.collection.Iterable<scala.util.Either<Evt,Cmd>> nothing()
Iterable[Either[EvtAbove, CmdBelow}
.
Use this when processing does not yield any commands or events as result.
<Cmd,Evt> scala.collection.Iterable<scala.util.Either<Evt,Cmd>> dealias(scala.collection.Iterable<scala.util.Either<Evt,Cmd>> msg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |