Interface LogEncoder.Buffer

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
JsonBuffer, LogEncoder.Buffer.StringBuilderBuffer
Enclosing interface:
LogEncoder

public static interface LogEncoder.Buffer extends AutoCloseable
Encoders buffer.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A buffer that simply wraps a StringBuilder.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Prepare the buffer for reuse.
    default void
    Convenience that will call clear.
    void
    drain(LogOutput output, LogEvent event)
    The appender will call this usually within a lock to transfer content from the buffer to the output.
  • Method Details

    • drain

      void drain(LogOutput output, LogEvent event)
      The appender will call this usually within a lock to transfer content from the buffer to the output.
      Parameters:
      output - output to receive content.
      event - log event.
    • clear

      void clear()
      Prepare the buffer for reuse.

      An appender may not call clear before being passed to the encoder so the encoder should do its own clearing.

    • close

      default void close()
      Convenience that will call clear.
      Specified by:
      close in interface AutoCloseable