Class LogtailerConstants

java.lang.Object
com.illumon.iris.db.tables.dataimport.logtailer.LogtailerConstants

public final class LogtailerConstants extends Object
Static class providing access to settings that control the tailer and the DIS, primarily buffer sizes and pooling behavior. These constants have some constraints and interactions, which are enforced here.
  • Field Details

    • MAX_ENTRY_SIZE_PROPERTY_NAME

      public static final String MAX_ENTRY_SIZE_PROPERTY_NAME
      See Also:
    • MAX_BINARY_LOG_ENTRY_SIZE

      public static final int MAX_BINARY_LOG_ENTRY_SIZE
      Maximum size of a binary log entry, in bytes.
    • DATA_IMPORT_CHANNEL_ITEM_HEADER_SIZE

      public static int DATA_IMPORT_CHANNEL_ITEM_HEADER_SIZE
    • DATA_IMPORT_CHANNEL_VERSION_SIZE

      public static int DATA_IMPORT_CHANNEL_VERSION_SIZE
    • DATA_IMPORT_CHANNEL_MAX_DATA_BODY_SIZE

      public static int DATA_IMPORT_CHANNEL_MAX_DATA_BODY_SIZE
    • DATA_IMPORT_CHANNEL_MAX_NON_DATA_BODY_SIZE

      public static int DATA_IMPORT_CHANNEL_MAX_NON_DATA_BODY_SIZE
    • PRODUCERS_USE_DIRECT_BUFFERS_PROP

      public static final String PRODUCERS_USE_DIRECT_BUFFERS_PROP
      Determines whether the Tailer will allocate direct buffers
      See Also:
    • CONSUMERS_USE_DIRECT_BUFFERS_PROP

      public static final String CONSUMERS_USE_DIRECT_BUFFERS_PROP
      Determines whether the DIS will allocate direct buffers
      See Also:
    • DISABLE_SYSTEM_POOL

      public static final boolean DISABLE_SYSTEM_POOL
    • DISABLE_USER_POOL

      public static final boolean DISABLE_USER_POOL
  • Method Details

    • getUserPoolCapacity

      public static int getUserPoolCapacity()
      Return the number of DataContent objects to pre-allocate for the Tailer, for user tables, when pooling is enabled.
      Returns:
      size of the user DataContent pool
    • getSystemPoolCapacity

      public static int getSystemPoolCapacity()
      Return the number of DataContent objects to pre-allocate for the Tailer, for system tables, when pooling is enabled.
      Returns:
      size of the system DataContent pool
    • shouldUseDirectBuffers

      public static boolean shouldUseDirectBuffers(boolean isProducer)
      Return true if the Tailer should allocate direct buffers.
      Parameters:
      isProducer - Whether this is for a producer (tailer) or consumer (DIS)
      Returns:
      whether the requested type of buffer should be direct
    • getProducerBufferSize

      public static int getProducerBufferSize(boolean isUser)
      Return the size buffer to allocate for a producer and the given type of table.
      Parameters:
      isUser - true if this is for a user table, false for a system table
      Returns:
      the number of bytes to allocate
    • getConsumerBufferSize

      public static int getConsumerBufferSize()
      Get the buffer size that should be allocated by the consumer (DIS). This is the max size of the producer buffer for all types.
      Returns:
      the buffer size for a consumer
    • getMaxProducerBufferSize

      public static int getMaxProducerBufferSize()
      The largest buffer size for any producer message.
      Returns:
      the largest buffer size that could be allocated
    • asString

      public static String asString()
      Write the current configuration as a string.
      Returns:
      the configuration string