java.lang.Object
com.couchbase.columnar.client.java.internal.ReactorHelper

@Internal public class ReactorHelper extends Object
  • Method Details

    • propagateAsCancellation

      public static CancellationException propagateAsCancellation(InterruptedException e)
    • forEachBlocking

      public static <T> void forEachBlocking(reactor.core.publisher.Flux<T> flux, int buffer, Consumer<T> callback)
      Funnels the contents of a Flux into a queue. Sends backpressure by delaying items until they are removed from the queue and processed by the supplied callback, which is executed in the thread that called this method.
      Parameters:
      flux - items to process
      buffer - number of items to buffer before sending them to the callback. Larger values might improve performance by reducing scheduler context switches.
      callback - a callback invoked once for every item in the flux. It is guaranteed to be invoked by the same thread that called this method.
      Throws:
      CancellationException - if the calling thread is interrupted while processing the items.