public static final class Saga.Options.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
Saga.Options |
build() |
Saga.Options.Builder |
setContinueWithError(boolean continueWithError)
continueWithError gives user the option to bail out of compensation operations if exception
is thrown while running them.
|
Saga.Options.Builder |
setParallelCompensation(boolean parallelCompensation)
This decides if the compensation operations are run in parallel.
|
public Saga.Options.Builder setParallelCompensation(boolean parallelCompensation)
parallelCompensation
- default is false.public Saga.Options.Builder setContinueWithError(boolean continueWithError)
continueWithError
- whether to proceed with the next compensation operation if the
previous throws exception. This only applies to sequential compensation. Default is
false.public Saga.Options build()