Pipeline Direction
The auto-pipeline also introduced the @PipelineDirection
annotation for the pipeline.
Specify the direction
We can specify the direction on methods or interfaces.
The default direction is @Direction.FORWARD
, here's the rules:
- Rule1: in the
@AutoPipeline
interface's method, we can:- add
Direction.FORWARD
to apply the interface's method, the annotated method will be called from head to tail - add
Direction.REVERSE
to apply the interface's method, the annotated method will be called from tail to head - if there's no
Direction annotation
to the method, the direction of pipeline will follow theDirection
in the in the@AutoPipeline
interface, see rule2 Direction.FORWARD
andDirection.REVERSE
are mutually exclusive, they cannot coexist
- add
- Rule2: in the
@AutoPipeline
interface, we can:- add
Direction.FORWARD
to the@AutoPipeline
interface, the methods declared in this interface will be called from head to tail unless the method is annotated withDirection
in the method level - add
Direction.REVERSE
to the@AutoPipeline
interface, the methods declared in this interface will be called from tail to head unless the method is annotated withDirection
in the method level - if no
Direction
annotation to the@AutoPipeline
interface, it equals to addDirection.FORWARD
to the@AutoPipeline
interface Direction.FORWARD
andDirection.REVERSE
are mutually exclusive, they cannot coexist
- add
Direction example
For examples, please check the RPC example and the test case.