Class OptimisticLockingTransactionResultImpl<I>
java.lang.Object
io.quarkus.redis.runtime.datasource.OptimisticLockingTransactionResultImpl<I>
- All Implemented Interfaces:
OptimisticLockingTransactionResult<I>,TransactionResult,Iterable<Object>
public class OptimisticLockingTransactionResultImpl<I>
extends Object
implements OptimisticLockingTransactionResult<I>
-
Constructor Summary
ConstructorsConstructorDescriptionOptimisticLockingTransactionResultImpl(boolean discarded, I input, List<Object> res) -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the transaction was discarded (rolled back)static <I> OptimisticLockingTransactionResult<I>discarded(I input) <T> Tget(int index) Returns the response at the specified position in thisTransactionResult.Retrieves the result from the pre-transaction blockbooleanisEmpty()Returnstrueif thisTransactionResultcontains no responses.iterator()intsize()Returns the number of responses.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
OptimisticLockingTransactionResultImpl
-
-
Method Details
-
discarded
-
discarded
public boolean discarded()Description copied from interface:TransactionResultChecks if the transaction was discarded (rolled back)- Specified by:
discardedin interfaceTransactionResult- Returns:
trueif the transaction batch was discarded.
-
size
public int size()Description copied from interface:TransactionResultReturns the number of responses.- Specified by:
sizein interfaceTransactionResult- Returns:
- the number of responses
-
isEmpty
public boolean isEmpty()Description copied from interface:TransactionResultReturnstrueif thisTransactionResultcontains no responses.- Specified by:
isEmptyin interfaceTransactionResult- Returns:
trueif thisTransactionResultcontains no responses
-
get
public <T> T get(int index) Description copied from interface:TransactionResultReturns the response at the specified position in thisTransactionResult. It contains the result of the commands executed at the same position in the transaction.- Specified by:
getin interfaceTransactionResult- Type Parameters:
T- the expected type- Parameters:
index- index of the element to return- Returns:
- the element at the specified position in this
TransactionResult
-
iterator
-
getPreTransactionResult
Description copied from interface:OptimisticLockingTransactionResultRetrieves the result from the pre-transaction block- Specified by:
getPreTransactionResultin interfaceOptimisticLockingTransactionResult<I>- Returns:
- the value produces by the pre-transaction block
-