Class PeekOperation<S>

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

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

    • PeekOperation

      public PeekOperation(Consumer<? super S> consumer)
  • 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
    • getConsumer

      public Consumer<? super S> getConsumer()
    • handleInjection

      public void handleInjection(ComponentRegistry registry)
      Description copied from interface: IntermediateOperation
      Handles injection of components for various dependencies that the intermediate operation has
      Specified by:
      handleInjection in interface IntermediateOperation<S,Stream<S>,S,Stream<S>>
      Parameters:
      registry - the registry to use
    • 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: