java.lang.Object
org.infinispan.server.resp.RespCommand
org.infinispan.server.resp.commands.tx.MULTI
All Implemented Interfaces:
Resp3Command, TransactionResp3Command

public class MULTI extends RespCommand implements Resp3Command, TransactionResp3Command
MULTI

This command marks the start of a transaction block. Subsequent operations are queued for later execution and receive a RespConstants.QUEUED_REPLY response. Each operation is verified for errors, for example, the number of arguments. Flawed operations receive the corresponding error reply and are discarded. Although, these errors do not abort the transaction.

Sending "nested" MULTI commands is not accepted, i.e., sending a MULTI command when already in a MULTI context. Again, this does not abort the transaction but returns an error.

Redis also does not include a rollback command. Instead, the user can send a DISCARD command to abort the transaction, clearing the queued commands and exiting the transaction context. Other commands with similar behavior are QUIT, SUBSCRIBE, and PSUBSCRIBE. The subscription commands drop the queued commands and enter pub-sub mode.

Since:
15.0
Author:
José Bolina
See Also: