Package org.apache.pekko.stream.javadsl
Class Partition
- java.lang.Object
- 
- org.apache.pekko.stream.javadsl.Partition
 
- 
 public class Partition extends java.lang.ObjectFan-out the stream to several streams. emitting an incoming upstream element to one downstream consumer according to the partitioner function applied to the elementAdheres to the ActorAttributes.SupervisionStrategyattribute.'''Emits when''' all of the outputs stops backpressuring and there is an input element available '''Backpressures when''' one of the outputs backpressure '''Completes when''' upstream completes '''Cancels when''' when any (eagerCancel=true) or all (eagerCancel=false) of the downstreams cancel 
- 
- 
Constructor SummaryConstructors Constructor Description Partition()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Graph<UniformFanOutShape<T,T>,NotUsed>create(int outputCount, Function<T,java.lang.Integer> partitioner)Create a newPartitionoperator with the specified input type,eagerCancelisfalse.static <T> Graph<UniformFanOutShape<T,T>,NotUsed>create(int outputCount, Function<T,java.lang.Integer> partitioner, boolean eagerCancel)Create a newPartitionoperator with the specified input type.static <T> Graph<UniformFanOutShape<T,T>,NotUsed>create(java.lang.Class<T> clazz, int outputCount, Function<T,java.lang.Integer> partitioner)Create a newPartitionoperator with the specified input type,eagerCancelisfalse.static <T> Graph<UniformFanOutShape<T,T>,NotUsed>create(java.lang.Class<T> clazz, int outputCount, Function<T,java.lang.Integer> partitioner, boolean eagerCancel)Create a newPartitionoperator with the specified input type.
 
- 
- 
- 
Method Detail- 
createpublic static <T> Graph<UniformFanOutShape<T,T>,NotUsed> create(int outputCount, Function<T,java.lang.Integer> partitioner) Create a newPartitionoperator with the specified input type,eagerCancelisfalse.- Parameters:
- outputCount- number of output ports
- partitioner- function deciding which output each element will be targeted
 
 - 
createpublic static <T> Graph<UniformFanOutShape<T,T>,NotUsed> create(int outputCount, Function<T,java.lang.Integer> partitioner, boolean eagerCancel) Create a newPartitionoperator with the specified input type.- Parameters:
- outputCount- number of output ports
- partitioner- function deciding which output each element will be targeted
- eagerCancel- this operator cancels, when any (true) or all (false) of the downstreams cancel
 
 - 
createpublic static <T> Graph<UniformFanOutShape<T,T>,NotUsed> create(java.lang.Class<T> clazz, int outputCount, Function<T,java.lang.Integer> partitioner) Create a newPartitionoperator with the specified input type,eagerCancelisfalse.- Parameters:
- clazz- a type hint for this method
- outputCount- number of output ports
- partitioner- function deciding which output each element will be targeted
 
 - 
createpublic static <T> Graph<UniformFanOutShape<T,T>,NotUsed> create(java.lang.Class<T> clazz, int outputCount, Function<T,java.lang.Integer> partitioner, boolean eagerCancel) Create a newPartitionoperator with the specified input type.- Parameters:
- clazz- a type hint for this method
- outputCount- number of output ports
- partitioner- function deciding which output each element will be targeted
- eagerCancel- this operator cancels, when any (true) or all (false) of the downstreams cancel
 
 
- 
 
-