Class AuditEventLogger

All Implemented Interfaces:
Logger, Closeable, Flushable, AutoCloseable

public final class AuditEventLogger extends MultiPartitionLoggerThreadUnsafeBase
Automatically generated Deephaven binary logger for DbInternal.AuditEventLog format 3. For configuration details, see `io.deephaven.enterprise.schema.internal.LogFormat`
  • Field Details

  • Method Details

    • header

      public static ByteBuffer header(String ServerHost, int ServerPort, String Process, String ProcessInfoId, String ProcessUser)
    • of

      public static AuditEventLogger of(boolean flushOnLog, MultiPartitionWriter writer, DateTimeFormatter partitionFormatter)
      Initialize a logger for the DbInternal.AuditEventLog table, with log format 3. The returned logger will own a byte array buffer of size 2 MiB (`bufferSize`) when flushOnLog == false, otherwise 1 MiB (`maxEntrySize`).
      Parameters:
      flushOnLog - if the returned logger should be flushed on every log call
      writer - the writer for this logger
      partitionFormatter - A datetime formatter for time based partition using the Timestamp column.
      Returns:
      the logger
    • log

      public void log(long Timestamp, String ClientHost, int ClientPort, String ClientUuid, String AuthenticatedUser, String EffectiveUser, String Namespace, String Table, int Id, String Event, String Details) throws IOException
      Encodes the data into this logger's buffer. If the remaining size of the buffer after logging is less than 1 MiB (`maxEntrySize`), this logger will be internally flushed.
      Parameters:
      Timestamp - the Timestamp value, in millis from the epoch
      ClientHost - the ClientHost value
      ClientPort - the ClientPort value
      ClientUuid - the ClientUuid value
      AuthenticatedUser - the AuthenticatedUser value
      EffectiveUser - the EffectiveUser value
      Namespace - the Namespace value
      Table - the Table value
      Id - the Id value
      Event - the Event value
      Details - the Details value
      Throws:
      IOException
    • loggerInfo

      public static LoggerInfo<AuditEventLogger> loggerInfo()
      The basic logger information.
      Returns:
      the basic logger information
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • partition

      protected final void partition(String arg0) throws IOException
      Throws:
      IOException
    • takeBuffer

      protected final ByteBuffer takeBuffer() throws IOException
      Throws:
      IOException
    • abortBuffer

      protected final void abortBuffer()
    • commitBuffer

      protected final void commitBuffer() throws IOException
      Throws:
      IOException
    • commitBuffers

      protected final void commitBuffers(int arg0) throws IOException
      Throws:
      IOException