Class WATCH
java.lang.Object
org.infinispan.server.resp.RespCommand
org.infinispan.server.resp.commands.tx.WATCH
- All Implemented Interfaces:
Resp3Command
,TransactionResp3Command
WATCH
Installs a clustered listener to watch for the given key
s. The listener receives events for creation,
updates, and expiration.
The watch instance is local to a single ChannelHandlerContext
. To remove the listeners, the same context
needs to execute the operation. There is no way to remove a single specific watcher. All listeners deregister during
an EXEC
, UNWATCH
, DISCARD, transaction abort, or closed channel.
Since a listener is bound to a single connection, this ensures that another client does not affect each other's transactions safeguards.
- Since:
- 15.0
- Author:
- José Bolina
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AdvancedExternalizer
<org.infinispan.server.resp.commands.tx.WATCH.TxEventConverterEmpty> Fields inherited from class org.infinispan.server.resp.RespCommand
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
aclMask()
perform
(Resp3Handler handler, io.netty.channel.ChannelHandlerContext ctx, List<byte[]> arguments) perform
(RespTransactionHandler handler, io.netty.channel.ChannelHandlerContext ctx, List<byte[]> arguments) void
register
(io.netty.channel.ChannelHandlerContext ctx, WATCH.TxKeysListener listener) Methods inherited from class org.infinispan.server.resp.RespCommand
extractKeys, fromByteBuf, getArity, getFirstKeyPos, getLastKeyPos, getName, getSteps, handleException, hasValidNumberOfArguments, match, size, toString
-
Field Details
-
EXTERNALIZER
public static final AdvancedExternalizer<org.infinispan.server.resp.commands.tx.WATCH.TxEventConverterEmpty> EXTERNALIZER
-
-
Constructor Details
-
WATCH
public WATCH()
-
-
Method Details
-
aclMask
public long aclMask()- Specified by:
aclMask
in classRespCommand
-
perform
public CompletionStage<RespRequestHandler> perform(Resp3Handler handler, io.netty.channel.ChannelHandlerContext ctx, List<byte[]> arguments) - Specified by:
perform
in interfaceResp3Command
-
perform
public CompletionStage<RespRequestHandler> perform(RespTransactionHandler handler, io.netty.channel.ChannelHandlerContext ctx, List<byte[]> arguments) - Specified by:
perform
in interfaceTransactionResp3Command
-
register
-