Class BufferingFlux

java.lang.Object
io.micrometer.statsd.internal.BufferingFlux

public class BufferingFlux extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static reactor.core.publisher.Flux<String>
    create(reactor.core.publisher.Flux<String> source, String delimiter, int maxByteArraySize, long maxMillisecondsBetweenEmits)
    Creates a Flux that implements Nagle's algorithm to buffer messages -- joined by a delimiter string -- to up a maximum number of bytes, or a maximum duration of time.

    Methods inherited from class java.lang.Object

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

    • create

      public static reactor.core.publisher.Flux<String> create(reactor.core.publisher.Flux<String> source, String delimiter, int maxByteArraySize, long maxMillisecondsBetweenEmits)
      Creates a Flux that implements Nagle's algorithm to buffer messages -- joined by a delimiter string -- to up a maximum number of bytes, or a maximum duration of time. This avoids sending many small packets in favor of fewer larger ones.
      Parameters:
      source - The input flux.
      delimiter - The delimiter to use to join messages
      maxByteArraySize - The buffered payload will contain no more than this number of bytes
      maxMillisecondsBetweenEmits - Buffered payloads will be emitted no less frequently than this.
      Returns:
      A flux implementing Nagle's algorithm.
      See Also: