Class IntradayLoggerImpl2<T extends WritableRowContainer>

java.lang.Object
com.illumon.intradaylogger.IntradayLoggerImpl2<T>
All Implemented Interfaces:
IntradayLogger
Direct Known Subclasses:
AuditEventLogFormat3Logger, BarrageSnapshotPerformanceLogger, BarrageSubscriptionPerformanceLogger, BlackScholesFormat1Logger, ProcessEventLogFormat2Logger, ProcessEventLogIndexLogger, ProcessMetricsFormat1Logger, ProcessTelemetryFormat1Logger, ProcessTelemetryIndexLogger, QueryOperationPerformanceLogCommunityIndexFormat1Logger, QueryOperationPerformanceLogCoreV2IndexFormat1Logger, QueryOperationPerformanceLogFormat3Logger, QueryOperationPerformanceLogIndexLogger, QueryPerformanceLogCommunityIndexFormat1Logger, QueryPerformanceLogCoreV2IndexFormat1Logger, QueryPerformanceLogFormat2Logger, QueryPerformanceLogIndexLogger, ServerStateLogCommunityIndexFormat1Logger, ServerStateLogCoreV2IndexFormat1Logger, UpdatePerformanceAncestorsIndexFormat1Logger, UpdatePerformanceLogCommunityIndexFormat1Logger, UpdatePerformanceLogCoreV2IndexFormat1Logger, UpdatePerformanceLogFormat4Logger, UpdatePerformanceLogIndexLogger, WorkspaceDataFormat1Logger

@Deprecated public abstract class IntradayLoggerImpl2<T extends WritableRowContainer> extends Object implements IntradayLogger
Deprecated.
Common parts of the generated IntradayLoggers. It is "2" so that we can change the implementation details from IntradayLoggerImpl; and existing client code will still compile. Otherwise, there is a chicken and egg problem, with clients not being able to run the new IntradayLoggerFactory using modules that contain their logger classes.
  • Field Details

    • writer

      protected TableWriter writer
      Deprecated.
    • setterPool

      protected PoolEx<T extends WritableRowContainer> setterPool
      Deprecated.
    • isClosed

      protected volatile boolean isClosed
      Deprecated.
    • isShuttingDown

      protected volatile boolean isShuttingDown
      Deprecated.
    • outstandingSetters

      protected final AtomicInteger outstandingSetters
      Deprecated.
    • verifyChecksumDisabled

      protected boolean verifyChecksumDisabled
      Deprecated.
    • forceStandaloneMode

      protected boolean forceStandaloneMode
      Deprecated.
  • Constructor Details

    • IntradayLoggerImpl2

      public IntradayLoggerImpl2()
      Deprecated.
    • IntradayLoggerImpl2

      public IntradayLoggerImpl2(String namespace, String tablename)
      Deprecated.
  • Method Details

    • init

      public final void init(String path, int queueSize) throws IOException
      Deprecated.
      Specified by:
      init in interface IntradayLogger
      Throws:
      IOException
    • init

      public final void init(String path, int queueSize, Thread writerThread) throws IOException
      Deprecated.
      Specified by:
      init in interface IntradayLogger
      Throws:
      IOException
    • init

      public final void init(IntradayLogger.TableWriterFactory tableWriterBuilder, int queueSize) throws IOException
      Deprecated.
      Specified by:
      init in interface IntradayLogger
      Throws:
      IOException
    • setOverflowThrottle

      public void setOverflowThrottle(long throttleMillis)
      Deprecated.
      Description copied from interface: IntradayLogger
      If the throttle is set to >= 0, then a pool and queue will be used that allows overflow. The overflowing will be throttled by a wait of this amount of time.
      Specified by:
      setOverflowThrottle in interface IntradayLogger
      Parameters:
      throttleMillis - milliseconds to wait before allocating new setters
    • init

      public final void init(IntradayLogger.TableWriterFactory tableWriterBuilder, int queueSize, @Nullable @Nullable Thread sharedWriterThread) throws IOException
      Deprecated.
      Specified by:
      init in interface IntradayLogger
      Throws:
      IOException
    • createSetter

      protected abstract T createSetter()
      Deprecated.
    • verifyChecksum

      protected abstract void verifyChecksum() throws IOException
      Deprecated.
      Throws:
      IOException
    • getTableWriter

      protected abstract TableWriter getTableWriter(IntradayLogger.TableWriterFactory tableWriterBuilder) throws IOException
      Deprecated.
      Throws:
      IOException
    • threadName

      protected abstract String threadName()
      Deprecated.
    • disableVerifyChecksum

      public final void disableVerifyChecksum()
      Deprecated.
      Disable verification of the checksum.
    • setStandaloneMode

      public final void setStandaloneMode()
      Deprecated.
      Indicates that the logger cannot access Deephaven services.
    • isInitialized

      protected final boolean isInitialized()
      Deprecated.
    • verifyCondition

      protected final void verifyCondition(boolean condition, String message)
      Deprecated.
      Check the condition and throw an IllegalStateException if it is not met.
      Parameters:
      condition - the condition to check
      message - useful information for the IllegalStateException
      Throws:
      IllegalStateException - if the condition is false
    • shutdown

      public final void shutdown()
      Deprecated.
      Description copied from interface: IntradayLogger
      Write all enqueued elements to the TableWriter and prevent further writes. This should be invoked before IntradayLogger.close(). This must not be invoked if any threads might still try to log additional items.
      Specified by:
      shutdown in interface IntradayLogger
    • flush

      protected final void flush(T setter)
      Deprecated.
    • waitDone

      public final void waitDone()
      Deprecated.
      Wait for all currently populated rows to be written to storage.
      Specified by:
      waitDone in interface IntradayLogger
    • waitDone

      public final boolean waitDone(long millis)
      Deprecated.
      Description copied from interface: IntradayLogger
      Block until output queue is empty, logger is closed, or timeout expires.
      Specified by:
      waitDone in interface IntradayLogger
      Parameters:
      millis - How long to wait, in milliseconds
      Returns:
      True if the output queue is empty and the logger closed, else false (e.g. because the timeout expired)
    • close

      public final void close() throws IOException
      Deprecated.
      Description copied from interface: IntradayLogger
      Close the logger and any writer in use. Users should quiesce all logging threads and invoke IntradayLogger.shutdown() first in order to guarantee that all pending rows have been written to storage.
      Specified by:
      close in interface IntradayLogger
      Throws:
      IOException - if an error occurred closing the logger.
    • isClosed

      public final boolean isClosed()
      Deprecated.
      Specified by:
      isClosed in interface IntradayLogger
    • tryWrite

      public final boolean tryWrite() throws IOException
      Deprecated.
      Description copied from interface: IntradayLogger

      Attempt to write a single row to the TableWriter created using the IntradayLogger.TableWriterFactory.

      Implementation Note: "written" simply means that the TableWriter accepted the write request. It may internally buffer the row.

      Specified by:
      tryWrite in interface IntradayLogger
      Returns:
      true if a row was written, false otherwise.
      Throws:
      IOException - if an error occurred during the write.
    • getWriterThread

      public final Thread getWriterThread()
      Deprecated.
      Description copied from interface: IntradayLogger
      Get the Thread that is responsible for writing data from this logger, i.e. the unique thread assigned to call IntradayLogger.tryWrite(). This will return null if invoked before one of the IntradayLogger.init(java.lang.String, int) overloads.
      Specified by:
      getWriterThread in interface IntradayLogger
      Returns:
      The writer Thread for this logger, or null if IntradayLogger.init(java.lang.String, int) hasn't been invoked yet