Class JdbcAppender.Builder<B extends JdbcAppender.Builder<B>>

All Implemented Interfaces:
Builder<JdbcAppender>
Enclosing class:
JdbcAppender

public static class JdbcAppender.Builder<B extends JdbcAppender.Builder<B>> extends AbstractDatabaseAppender.Builder<B> implements Builder<JdbcAppender>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public JdbcAppender build()
      Description copied from interface: Builder
      Builds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.
      Specified by:
      build in interface Builder<B extends JdbcAppender.Builder<B>>
      Returns:
      the configured instance.
    • getReconnectIntervalMillis

      public long getReconnectIntervalMillis()
    • isImmediateFail

      public boolean isImmediateFail()
    • setBufferSize

      public B setBufferSize(int bufferSize)
      If an integer greater than 0, this causes the appender to buffer log events and flush whenever the buffer reaches this size.
      Parameters:
      bufferSize - buffer size.
      Returns:
      this
    • setColumnConfigs

      public B setColumnConfigs(ColumnConfig... columnConfigs)
      Information about the columns that log event data should be inserted into and how to insert that data.
      Parameters:
      columnConfigs - Column configurations.
      Returns:
      this
    • setColumnMappings

      public B setColumnMappings(ColumnMapping... columnMappings)
    • setConnectionSource

      public B setConnectionSource(ConnectionSource connectionSource)
      The connections source from which database connections should be retrieved.
      Parameters:
      connectionSource - The connections source.
      Returns:
      this
    • setImmediateFail

      public void setImmediateFail(boolean immediateFail)
    • setReconnectIntervalMillis

      public void setReconnectIntervalMillis(long reconnectIntervalMillis)
    • setTableName

      public B setTableName(String tableName)
      The name of the database table to insert log events into.
      Parameters:
      tableName - The database table name.
      Returns:
      this
    • setTruncateStrings

      public B setTruncateStrings(boolean truncateStrings)