public static class TransactionConfig.Builder extends Object
transaction configuration
objects.Modifier and Type | Method and Description |
---|---|
TransactionConfig |
build()
Build the transaction configuration object using the specified settings.
|
TransactionConfig.Builder |
withMetadata(Map<String,Object> metadata)
Set the transaction metadata.
|
TransactionConfig.Builder |
withTimeout(Duration timeout)
Set the transaction timeout.
|
public TransactionConfig.Builder withTimeout(Duration timeout)
This functionality allows to limit query/transaction execution time. Specified timeout overrides the default timeout configured in the database
using dbms.transaction.timeout
setting.
Provided value should not be null
and should not represent a duration of zero or negative duration.
timeout
- the timeout.public TransactionConfig.Builder withMetadata(Map<String,Object> metadata)
dbms.listQueries
and dbms.listTransactions
procedures. It will also get logged to the query.log
.
This functionality makes it easier to tag transactions and is equivalent to dbms.setTXMetaData
procedure.
Provided value should not be null
.
metadata
- the metadata.public TransactionConfig build()