Class WATCH
java.lang.Object
org.infinispan.server.resp.RespCommand
org.infinispan.server.resp.commands.tx.WATCH
- All Implemented Interfaces:
BaseResp3Command
,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 ClassesModifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Fields inherited from class org.infinispan.server.resp.RespCommand
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionperform
(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
aclMask, extractKeys, fromByteBuf, fromString, getArity, getFirstKeyPos, getLastKeyPos, getName, getSteps, handleException, hasValidNumberOfArguments, match, size, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.infinispan.server.resp.commands.BaseResp3Command
aclMask
-
Constructor Details
-
WATCH
public WATCH()
-
-
Method Details
-
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
-