Class LogTailOptions.Builder

java.lang.Object
codes.grow.packages.openobserve.logs.LogTailOptions.Builder
Enclosing class:
LogTailOptions

public static final class LogTailOptions.Builder extends Object
Builder of LogTailOptions.
  • Method Details

    • filter

      public LogTailOptions.Builder filter(String filter)
      Sets a SQL condition such as match_all('error').
      Parameters:
      filter - condition
      Returns:
      this builder
    • start

      public LogTailOptions.Builder start(Instant start)
      Sets the earliest delivered row time.
      Parameters:
      start - start
      Returns:
      this builder
    • interval

      public LogTailOptions.Builder interval(Duration interval)
      Sets the poll interval.
      Parameters:
      interval - interval
      Returns:
      this builder
    • overlap

      public LogTailOptions.Builder overlap(Duration overlap)
      Sets the re-read window that catches late rows (duplicates are dropped).
      Parameters:
      overlap - overlap
      Returns:
      this builder
    • pageSize

      public LogTailOptions.Builder pageSize(int pageSize)
      Sets the rows per poll request.
      Parameters:
      pageSize - page size
      Returns:
      this builder
    • streamType

      public LogTailOptions.Builder streamType(StreamType streamType)
      Sets the stream type.
      Parameters:
      streamType - stream type
      Returns:
      this builder
    • onError

      public LogTailOptions.Builder onError(Consumer<Throwable> onError)
      Sets the callback for failed polls (tailing continues).
      Parameters:
      onError - callback
      Returns:
      this builder
    • build

      public LogTailOptions build()
      Builds the options.
      Returns:
      the options