Class LimitOperation<S>

java.lang.Object
org.infinispan.stream.impl.intops.object.LimitOperation<S>
All Implemented Interfaces:
IntermediateOperation<S,Stream<S>,S,Stream<S>>

public class LimitOperation<S> extends Object implements IntermediateOperation<S,Stream<S>,S,Stream<S>>
Performs limit operation on a regular Stream
  • Constructor Details

    • LimitOperation

      public LimitOperation(long limit)
  • Method Details

    • perform

      public Stream<S> perform(Stream<S> stream)
      Description copied from interface: IntermediateOperation
      Performs the actualy intermediate operation returning the resulting stream
      Specified by:
      perform in interface IntermediateOperation<S,Stream<S>,S,Stream<S>>
      Parameters:
      stream - the stream to have the operation performed on
      Returns:
      the resulting stream after the operation was applied
    • getLimit

      public long getLimit()
    • mapFlowable

      public io.reactivex.rxjava3.core.Flowable<S> mapFlowable(io.reactivex.rxjava3.core.Flowable<S> input)
      Description copied from interface: IntermediateOperation
      Performs the intermediate operation on a Flowable. This is an interop method to allow Distributed Streams to actually use Distributed Publisher
      Specified by:
      mapFlowable in interface IntermediateOperation<S,Stream<S>,S,Stream<S>>
      Parameters:
      input - the input flowable
      Returns: