Record Class JDBCPipesReporterConfig
java.lang.Object
java.lang.Record
org.apache.tika.pipes.reporter.jdbc.JDBCPipesReporterConfig
- Record Components:
connectionString- connection stringreportSql- 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 withreportSql. 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-
-
Constructor Summary
ConstructorsConstructorDescriptionJDBCPipesReporterConfig(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 aJDBCPipesReporterConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecacheSizerecord component.Returns the value of theconnectionStringrecord component.booleanReturns the value of thecreateTablerecord component.final booleanIndicates whether some other object is "equal to" this one.excludes()Returns the value of theexcludesrecord component.final inthashCode()Returns a hash code value for this object.includes()Returns the value of theincludesrecord component.static JDBCPipesReporterConfigReturns the value of thepostConnectionSqlrecord component.Returns the value of thereportSqlrecord component.Returns the value of thereportVariablesrecord component.longReturns the value of thereportWithinMsrecord component.Returns the value of thetableNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JDBCPipesReporterConfig
-
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 aJDBCPipesReporterConfigrecord class.- Parameters:
connectionString- the value for theconnectionStringrecord componentincludes- the value for theincludesrecord componentexcludes- the value for theexcludesrecord componentreportSql- the value for thereportSqlrecord componenttableName- the value for thetableNamerecord componentcreateTable- the value for thecreateTablerecord componentpostConnectionSql- the value for thepostConnectionSqlrecord componentreportVariables- the value for thereportVariablesrecord componentreportWithinMs- the value for thereportWithinMsrecord componentcacheSize- the value for thecacheSizerecord component
-
-
Method Details
-
load
- Throws:
TikaConfigException
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
connectionString
Returns the value of theconnectionStringrecord component.- Returns:
- the value of the
connectionStringrecord component
-
includes
Returns the value of theincludesrecord component.- Returns:
- the value of the
includesrecord component
-
excludes
Returns the value of theexcludesrecord component.- Returns:
- the value of the
excludesrecord component
-
reportSql
Returns the value of thereportSqlrecord component.- Returns:
- the value of the
reportSqlrecord component
-
tableName
Returns the value of thetableNamerecord component.- Returns:
- the value of the
tableNamerecord component
-
createTable
public boolean createTable()Returns the value of thecreateTablerecord component.- Returns:
- the value of the
createTablerecord component
-
postConnectionSql
Returns the value of thepostConnectionSqlrecord component.- Returns:
- the value of the
postConnectionSqlrecord component
-
reportVariables
Returns the value of thereportVariablesrecord component.- Returns:
- the value of the
reportVariablesrecord component
-
reportWithinMs
public long reportWithinMs()Returns the value of thereportWithinMsrecord component.- Returns:
- the value of the
reportWithinMsrecord component
-
cacheSize
public int cacheSize()Returns the value of thecacheSizerecord component.- Returns:
- the value of the
cacheSizerecord component
-