Composite operators and consistent regions
@consistent
annotation
is applied to a composite operator, the annotation indicates that
the composite operator and the reachability graph of
the composite operator participate in a single consistent region.
All
the primitive operators inside the composite operator and their reachability
graphs form a single consistent region even if they do not form a
connected subgraph.- An operator that has no input streams, for example, a source operator
- An operator in which all its input stream connections originate from outside of the enclosing annotated composite. Such an operator must be able to replay its output stream. If it is not, include a
ReplayableStart
operator as the start operator. Remember, however, that applications that use aReplayableStart
operator cannot be deployed to an instance with fewer than four host resources.
The following figures show several examples on how consistent regions
are computed when the @consistent
annotation is applied
to composite operators.
One composite operator with one consistent region
The
following figure shows an example of an SPL graph that is annotated
with @consistent
. In this example, the whole composite,
which is indicated by the box, is annotated with @consistent
.
The figure shows the same pattern on all the operators that are in
the consistent region. All the operators that are inside the composite
belong to the same consistent region. The compiler automatically identified op1
and op7
as
the start operators of the consistent region, which are indicated
with the label, start
. From the two start operators,
the compiler computes their reachability graph. The compiler identifies op6
, op9
,
and op10
as the end operators of the consistent
region, which are indicated with the label, end
.
All the end operators are sink operators.

Composite operator with disconnected subgraphs
The
following figure shows an example of a composite operator (shown with
the box) with the @consistent
annotation. In this
example, the composite operator contains two disconnected subgraphs:
the subgraph with op1
through op5
and op6
and
the subgraph with op7
through op9
.
Because the annotation is applied on the composite operator, both
subgraphs are in the same consistent region.

Multiple composite operators with one consistent region
The
following figure shows an example where the @consistent
annotation
is placed on two composite operators. The reachability graph of both
composite operators contains op15
, which
results in a single consistent region.
