Record Class JDBCPipesReporterConfig

java.lang.Object
java.lang.Record
org.apache.tika.pipes.reporter.jdbc.JDBCPipesReporterConfig
Record Components:
connectionString - connection string
reportSql - This is the sql for the prepared statement to execute to store the report record. the default is: insert into tika_status (id, status, timestamp) values (?,?,?)
tableName - table name or defaults to 'tika_status'
createTable - whether or not to create the table NOTE The default behavior is to drop the table if it exists and then create it. Make sure to set this to false if you do not want to drop the table.
postConnectionSql - This sql will be called immediately after the connection is made. This was initially added for setting pragmas on sqlite3, but may be used for other connection configuration in other dbs. Note: This is called before the table is created if it needs to be created.
reportVariables - ADVANCED: This is used to set the variables in the prepared statement for the report. This needs to be coordinated with reportSql. The available variables are "id, status, timestamp". If you're modifying to an update statement like "update table tika_status set status=?, timestamp=? where id = ?" then the values for this would be ["status", "timestamp", "id"].
reportWithinMs -
cacheSize -

public record JDBCPipesReporterConfig(String connectionString, Set<String> includes, Set<String> excludes, String reportSql, String tableName, boolean createTable, String postConnectionSql, List<String> reportVariables, long reportWithinMs, int cacheSize) extends Record
  • Constructor Details

    • JDBCPipesReporterConfig

      public JDBCPipesReporterConfig(String connectionString, Set<String> includes, Set<String> excludes)
    • JDBCPipesReporterConfig

      public JDBCPipesReporterConfig(String connectionString, Set<String> includes, Set<String> excludes, String reportSql, String tableName, boolean createTable, String postConnectionSql, List<String> reportVariables, long reportWithinMs, int cacheSize)
      Creates an instance of a JDBCPipesReporterConfig record class.
      Parameters:
      connectionString - the value for the connectionString record component
      includes - the value for the includes record component
      excludes - the value for the excludes record component
      reportSql - the value for the reportSql record component
      tableName - the value for the tableName record component
      createTable - the value for the createTable record component
      postConnectionSql - the value for the postConnectionSql record component
      reportVariables - the value for the reportVariables record component
      reportWithinMs - the value for the reportWithinMs record component
      cacheSize - the value for the cacheSize record component
  • Method Details

    • load

      public static JDBCPipesReporterConfig load(String json) throws TikaConfigException
      Throws:
      TikaConfigException
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • connectionString

      public String connectionString()
      Returns the value of the connectionString record component.
      Returns:
      the value of the connectionString record component
    • includes

      public Set<String> includes()
      Returns the value of the includes record component.
      Returns:
      the value of the includes record component
    • excludes

      public Set<String> excludes()
      Returns the value of the excludes record component.
      Returns:
      the value of the excludes record component
    • reportSql

      public String reportSql()
      Returns the value of the reportSql record component.
      Returns:
      the value of the reportSql record component
    • tableName

      public String tableName()
      Returns the value of the tableName record component.
      Returns:
      the value of the tableName record component
    • createTable

      public boolean createTable()
      Returns the value of the createTable record component.
      Returns:
      the value of the createTable record component
    • postConnectionSql

      public String postConnectionSql()
      Returns the value of the postConnectionSql record component.
      Returns:
      the value of the postConnectionSql record component
    • reportVariables

      public List<String> reportVariables()
      Returns the value of the reportVariables record component.
      Returns:
      the value of the reportVariables record component
    • reportWithinMs

      public long reportWithinMs()
      Returns the value of the reportWithinMs record component.
      Returns:
      the value of the reportWithinMs record component
    • cacheSize

      public int cacheSize()
      Returns the value of the cacheSize record component.
      Returns:
      the value of the cacheSize record component