Class StatementLog.Builder<T>
java.lang.Object
com.pyranid.StatementLog.Builder<T>
- Enclosing class:
StatementLog<T>
Builder used to construct instances of
StatementLog.
This class is intended for use by a single thread.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionSpecifies the size of the batch operation.build()Constructs aStatementLoginstance.connectionAcquisitionDuration(Duration connectionAcquisitionDuration) Specifies how long it took to acquire aConnectionfrom theDataSource.Specifies the exception that occurred during SQL statement execution.executionDuration(Duration executionDuration) Specifies how long it took to execute a SQL statement.preparationDuration(Duration preparationDuration) Specifies how long it took to bind data to aPreparedStatement.resultSetMappingDuration(Duration resultSetMappingDuration) Specifies how long it took to extract data from aResultSet.
-
Method Details
-
connectionAcquisitionDuration
@Nonnull public StatementLog.Builder connectionAcquisitionDuration(@Nullable Duration connectionAcquisitionDuration) Specifies how long it took to acquire aConnectionfrom theDataSource.- Parameters:
connectionAcquisitionDuration- how long it took to acquire aConnection, if available- Returns:
- this
Builder, for chaining
-
preparationDuration
Specifies how long it took to bind data to aPreparedStatement.- Parameters:
preparationDuration- how long it took to bind data to aPreparedStatement, if available- Returns:
- this
Builder, for chaining
-
executionDuration
Specifies how long it took to execute a SQL statement.- Parameters:
executionDuration- how long it took to execute a SQL statement, if available- Returns:
- this
Builder, for chaining
-
resultSetMappingDuration
-
batchSize
Specifies the size of the batch operation.- Parameters:
batchSize- how many records were processed as part of the batch operation, if available- Returns:
- this
Builder, for chaining
-
exception
Specifies the exception that occurred during SQL statement execution.- Parameters:
exception- the exception that occurred during SQL statement execution, if available- Returns:
- this
Builder, for chaining
-
build
Constructs aStatementLoginstance.- Returns:
- a
StatementLoginstance
-