public static class SerializableTransactionRunner.Configuration extends Object implements JdbiConfig<SerializableTransactionRunner.Configuration>
| Constructor and Description |
|---|
Configuration() |
| Modifier and Type | Method and Description |
|---|---|
SerializableTransactionRunner.Configuration |
createCopy()
Returns a copy of this configuration object.
|
SerializableTransactionRunner.Configuration |
setMaxRetries(int maxRetries) |
SerializableTransactionRunner.Configuration |
setOnFailure(Consumer<List<Exception>> onFailure) |
SerializableTransactionRunner.Configuration |
setOnSuccess(Consumer<List<Exception>> onSuccess) |
SerializableTransactionRunner.Configuration |
setSerializationFailureSqlState(String serializationFailureSqlState) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetRegistrypublic SerializableTransactionRunner.Configuration createCopy()
JdbiConfigcreateCopy in interface JdbiConfig<SerializableTransactionRunner.Configuration>public SerializableTransactionRunner.Configuration setMaxRetries(int maxRetries)
maxRetries - number of retry attempts before abortingpublic SerializableTransactionRunner.Configuration setOnFailure(Consumer<List<Exception>> onFailure)
onFailure - consumer to handle the list of failures so far (e.g. for logging). Will not be called with an empty list, nor with any exceptions that are not the configured serialization failure — the latter will simply be thrown, aborting the operation.public SerializableTransactionRunner.Configuration setOnSuccess(Consumer<List<Exception>> onSuccess)
onSuccess - consumer to handle the list of failures that occurred during a transaction run, after the run has completed successfully (e.g. for logging). Will hopefully be called with an empty list, but with the same list of exceptions as the one passed to onFailure otherwise. Will not be called with any exceptions that are not the configured serialization failure — the latter will simply be thrown, aborting the operation.public SerializableTransactionRunner.Configuration setSerializationFailureSqlState(String serializationFailureSqlState)
serializationFailureSqlState - the SQL state to consider as a serialization failureCopyright © 2019. All rights reserved.