Interface ITransaction
- Namespace
- StackExchange.Redis
- Assembly
- StackExchange.Redis.StrongName.dll
Represents a group of operations that will be sent to the server as a single unit, and processed on the server as a single unit. Transactions can also include constraints (implemented via WATCH), but note that constraint checking involves will (very briefly) block the connection, since the transaction cannot be correctly committed (EXEC), aborted (DISCARD) or not applied in the first place (UNWATCH) until the responses from the constraint checks have arrived.
public interface ITransaction : IBatch, IDatabaseAsync, IRedisAsync
- Inherited Members
Remarks
Methods
AddCondition(Condition)
Adds a precondition for this transaction
ConditionResult AddCondition(Condition condition)
Parameters
condition
Condition
Returns
Execute(CommandFlags)
Execute the batch operation, sending all queued commands to the server.
bool Execute(CommandFlags flags = CommandFlags.None)
Parameters
flags
CommandFlags
Returns
ExecuteAsync(CommandFlags)
Execute the batch operation, sending all queued commands to the server.
Task<bool> ExecuteAsync(CommandFlags flags = CommandFlags.None)
Parameters
flags
CommandFlags