Class QueryUserAssignmentLoggerImpl

java.lang.Object
io.deephaven.enterprise.binlog.buffered.impl.MultiPartitionLoggerThreadSafeBase
io.deephaven.enterprise.binlog.internal.gen.QueryUserAssignmentLoggerImpl
All Implemented Interfaces:
Logger, QueryUserAssignmentLogger, Closeable, Flushable, AutoCloseable

public final class QueryUserAssignmentLoggerImpl extends MultiPartitionLoggerThreadSafeBase implements QueryUserAssignmentLogger
Automatically generated Deephaven binary logger for DbInternal.QueryUserAssignmentLog format 1. For configuration details, see `io.deephaven.enterprise.schema.internal.LogFormat`
  • Field Details

  • Method Details

    • header

      public static ByteBuffer header()
    • of

      public static QueryUserAssignmentLoggerImpl of(boolean flushOnLog, MultiPartitionWriter writer, DateTimeFormatter partitionFormatter)
      Initialize a logger for the DbInternal.QueryUserAssignmentLog table, with log format 1. 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 User, long QuerySerial, String QueryOwner, String[] AdminGroups, int AssignedSlot, String PolicyName, boolean IsReset, 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.
      Specified by:
      log in interface QueryUserAssignmentLogger
      Parameters:
      Timestamp - the Timestamp value, in millis from the epoch
      User - the User value
      QuerySerial - the QuerySerial value
      QueryOwner - the QueryOwner value
      AdminGroups - the AdminGroups value
      AssignedSlot - the AssignedSlot value
      PolicyName - the PolicyName value
      IsReset - the IsReset value
      Details - the Details value
      Throws:
      IOException
    • loggerInfo

      public static LoggerInfo<QueryUserAssignmentLoggerImpl> 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 partition) 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 numRows) throws IOException
      Throws:
      IOException