R - the type of resultT - the type of PassEntitypublic static class CriticalRepositoryInteraction.CriticalResult<R,T> extends Object
| Constructor and Description |
|---|
CriticalResult(R result,
T resource,
boolean success) |
CriticalResult(R result,
T resource,
boolean success,
Throwable t) |
| Modifier and Type | Method and Description |
|---|---|
Optional<T> |
resource()
The state of the
PassEntity resource as it was when the interaction with the repository completed. |
Optional<R> |
result()
The result of executing the critical code path.
|
boolean |
success()
Result of evaluating the post condition of the critical path,
false otherwise. |
Optional<Throwable> |
throwable()
Captures any exception that may have occurred when executing the critical path.
|
public Optional<T> resource()
PassEntity resource as it was when the interaction with the repository completed.
If the interaction with the repository completed without error, the Optional should not be empty.Optional containing the state of the PassEntity at the end of the repository
interactionpublic Optional<R> result()
public boolean success()
false otherwise.false otherwise.Copyright © 2019. All rights reserved.