Class FlowableOperatorReadAhead<T>

java.lang.Object
org.aksw.commons.rx.op.FlowableOperatorReadAhead<T>
Type Parameters:
T - Item type
K - Group key type
V - Accumulator type
All Implemented Interfaces:
io.reactivex.rxjava3.core.FlowableOperator<T,T>

public final class FlowableOperatorReadAhead<T> extends Object implements io.reactivex.rxjava3.core.FlowableOperator<T,T>

 		Flowable<Entry<Integer, List<Integer>>> list = Flowable
			.range(0, 10)
			.map(i -> Maps.immutableEntry((int)(i / 3), i))
			.lift(FlowableOperatorSequentialGroupBy.<Entry<Integer, Integer>, Integer, List<Integer>>create(Entry::getKey, ArrayList::new, (acc, e) -> acc.add(e.getValue())));

 
Author:
raven
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    The amount of items to read ahead
  • Constructor Summary

    Constructors
    Constructor
    Description
    FlowableOperatorReadAhead(int readAheadAmount)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.reactivestreams.Subscriber<? super T>
    apply(org.reactivestreams.Subscriber<? super T> downstream)
     
    create(int readAheadAmount)
    Create method with the following characteristics: the accumulator constructor is a mere supplier (and thus neither depends on the accumulator count nor the group Key) Group keys are compared using Objects::equals

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • readAheadAmount

      protected int readAheadAmount
      The amount of items to read ahead
  • Constructor Details

    • FlowableOperatorReadAhead

      public FlowableOperatorReadAhead(int readAheadAmount)
  • Method Details

    • create

      public static <T> FlowableOperatorReadAhead<T> create(int readAheadAmount)
      Create method with the following characteristics:
      • the accumulator constructor is a mere supplier (and thus neither depends on the accumulator count nor the group Key)
      • Group keys are compared using Objects::equals
    • apply

      public org.reactivestreams.Subscriber<? super T> apply(org.reactivestreams.Subscriber<? super T> downstream) throws Exception
      Specified by:
      apply in interface io.reactivex.rxjava3.core.FlowableOperator<T,T>
      Throws:
      Exception