Class WATCH
java.lang.Object
org.infinispan.server.resp.RespCommand
org.infinispan.server.resp.commands.tx.WATCH
- All Implemented Interfaces:
Resp3Command,TransactionResp3Command
`
WATCH key [key ...]` command.
Installs a clustered listener to watch for the given keys. 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 org.infinispan.commons.marshall.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 TypeMethodDescriptionperform(Resp3Handler handler, io.netty.channel.ChannelHandlerContext ctx, List<byte[]> arguments) perform(RespTransactionHandler handler, io.netty.channel.ChannelHandlerContext ctx, List<byte[]> arguments) voidregister(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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.server.resp.commands.Resp3Command
handleException
-
Field Details
-
EXTERNALIZER
public static final org.infinispan.commons.marshall.AdvancedExternalizer<org.infinispan.server.resp.commands.tx.WATCH.TxEventConverterEmpty> EXTERNALIZER
-
-
Constructor Details
-
WATCH
public WATCH()
-
-
Method Details
-
perform
public CompletionStage<RespRequestHandler> perform(Resp3Handler handler, io.netty.channel.ChannelHandlerContext ctx, List<byte[]> arguments) - Specified by:
performin interfaceResp3Command
-
perform
public CompletionStage<RespRequestHandler> perform(RespTransactionHandler handler, io.netty.channel.ChannelHandlerContext ctx, List<byte[]> arguments) - Specified by:
performin interfaceTransactionResp3Command
-
register
-