Class AbstractLMOVEM
java.lang.Object
org.infinispan.server.resp.RespCommand
org.infinispan.server.resp.commands.list.AbstractLMOVEM
- All Implemented Interfaces:
BaseResp3Command
Shared logic for the
LMOVEM and BLMOVEM commands: argument parsing and the
underlying poll-from-source/push-to-destination operation.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final byte[]protected static final byte[]protected static final byte[]protected static final byte[]protected static final byte[]protected static final byte[]Fields inherited from class RespCommand
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CompletionStage<Collection<byte[]>> executeLmovem(String command, EmbeddedMultimapListCache<byte[], byte[]> listMultimap, AbstractLMOVEM.LmovemConfig config) Execute the LMOVEM operation: poll from source, push to destination.protected static AbstractLMOVEM.LmovemConfigparseArguments(Resp3Handler handler, List<byte[]> arguments, boolean withTimeout) Parse the shared LMOVEM arguments.Methods inherited from class RespCommand
aclMask, extractKeys, fromByteBuf, fromString, getArity, getFirstKeyPos, getLastKeyPos, getName, getSteps, handleException, hasValidNumberOfArguments, match, size, toString
-
Field Details
-
LEFT
protected static final byte[] LEFT -
RIGHT
protected static final byte[] RIGHT -
COUNT
protected static final byte[] COUNT -
EXACTLY
protected static final byte[] EXACTLY -
OBO
protected static final byte[] OBO -
BULK
protected static final byte[] BULK
-
-
Constructor Details
-
AbstractLMOVEM
protected AbstractLMOVEM(int arity, long aclMask)
-
-
Method Details
-
parseArguments
protected static AbstractLMOVEM.LmovemConfig parseArguments(Resp3Handler handler, List<byte[]> arguments, boolean withTimeout) Parse the shared LMOVEM arguments. Arguments: source destination LEFT|RIGHT LEFT|RIGHT [timeout] [COUNT|EXACTLY count OBO|BULK]- Parameters:
handler- the handler for error responsesarguments- the argument listwithTimeout- whether a timeout argument is present between the directions and the optional block- Returns:
- parsed config, or null if an error response was written
-
executeLmovem
public static CompletionStage<Collection<byte[]>> executeLmovem(String command, EmbeddedMultimapListCache<byte[], byte[]> listMultimap, AbstractLMOVEM.LmovemConfig config) Execute the LMOVEM operation: poll from source, push to destination.- Returns:
- a stage that completes with the moved elements, or null if nothing was moved
-