Class WorkspaceDataLogger

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

public final class WorkspaceDataLogger extends io.deephaven.enterprise.binlog.buffered.impl.MultiPartitionLoggerThreadSafeBase
Automatically generated Deephaven binary logger for DbInternal.WorkspaceData format 2. For configuration details, see `io.deephaven.enterprise.schema.internal.LogFormat`
  • Field Details

    • FLAG_NONE

      public static final byte FLAG_NONE
      Flag indicating that this row is neither the beginning nor end of a transaction.
      See Also:
    • FLAG_START

      public static final byte FLAG_START
      Flag indicating that this row is the beginning of a transaction.
      See Also:
    • FLAG_END

      public static final byte FLAG_END
      Flag indicating that this row is the end of a transaction.
      See Also:
    • FLAG_SINGLE_ROW

      public static final byte FLAG_SINGLE_ROW
      Flag indicating that this row is the beginning and end of a transaction.
      See Also:
    • IS_SYSTEM_NAMESPACE

      public static final boolean IS_SYSTEM_NAMESPACE
      If this is a System namespace
      See Also:
    • NAMESPACE

      public static final String NAMESPACE
      The Namespace
      See Also:
    • TABLE_NAME

      public static final String TABLE_NAME
      The TableName
      See Also:
    • LOG_FORMAT

      public static final int LOG_FORMAT
      The log format version
      See Also:
    • MAX_ENTRY_SIZE

      public static final int MAX_ENTRY_SIZE
      See Also:
    • BUFFER_SIZE

      public static final int BUFFER_SIZE
      See Also:
  • Method Details

    • header

      public static ByteBuffer header()
    • of

      public static WorkspaceDataLogger of(boolean flushOnLog, io.deephaven.enterprise.binlog.writer.MultiPartitionWriter writer, DateTimeFormatter partitionFormatter)
      Initialize a logger for the DbInternal.WorkspaceData table, with log format 2. 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 LastModifiedTime column.
      Returns:
      the logger
    • log

      public void log(byte flags, String Owner, String Name, String Id, int Version, String DataType, String Data, String Status, String[] AdminGroups, String[] ViewerGroups, String LastModifiedByAuthenticated, String LastModifiedByEffective, long LastModifiedTime) 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:
      flags - the flags for this row, which start and end transactions
      Owner - the Owner value
      Name - the Name value
      Id - the Id value
      Version - the Version value
      DataType - the DataType value
      Data - the Data value
      Status - the Status value
      AdminGroups - the AdminGroups value
      ViewerGroups - the ViewerGroups value
      LastModifiedByAuthenticated - the LastModifiedByAuthenticated value
      LastModifiedByEffective - the LastModifiedByEffective value
      LastModifiedTime - the LastModifiedTime value, in millis from the epoch
      Throws:
      IOException
    • loggerInfo

      public static io.deephaven.enterprise.binlog.support.LoggerInfo<WorkspaceDataLogger> 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