Class TailFlux

All Implemented Interfaces:
Expression, HasImports

public final class TailFlux extends AbstractParametrizedFlux
Tail caps the number of records in output tables to a fixed size n. See SPEC.

Options

  • n - The maximum number of records to output [int].
  • offset - The number of records to skip per table [int]. Default to 0.

Example

 Flux flux = Flux
     .from("telegraf")
     .tail(5);
 
Author:
Jakub Bednar (14/12/2020 10:20)
  • Constructor Details

    • TailFlux

      public TailFlux(@Nonnull Flux flux)
  • Method Details

    • operatorName

      @Nonnull protected String operatorName()
      Specified by:
      operatorName in class AbstractParametrizedFlux
      Returns:
      name of function
    • withN

      @Nonnull public TailFlux withN(int numberOfResults)
      Parameters:
      numberOfResults - The number of results
      Returns:
      this
    • withOffset

      @Nonnull public TailFlux withOffset(int offset)
      Parameters:
      offset - The number of records to skip per table.
      Returns:
      this
    • collectImports

      public void collectImports(@Nonnull Set<String> collectedImports)
      Description copied from class: Flux
      Collects all imports of the flux.
      Overrides:
      collectImports in class Flux
      Parameters:
      collectedImports - a set to be filled by the used imports