Class AbstractLMOVEM

java.lang.Object
org.infinispan.server.resp.RespCommand
org.infinispan.server.resp.commands.list.AbstractLMOVEM
All Implemented Interfaces:
BaseResp3Command
Direct Known Subclasses:
BLMOVEM, LMOVE, LMOVEM

public abstract class AbstractLMOVEM extends RespCommand
Shared logic for the LMOVEM and BLMOVEM commands: argument parsing and the underlying poll-from-source/push-to-destination operation.
  • Field Details

    • LEFT

      protected static final byte[] LEFT
    • 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 responses
      arguments - the argument list
      withTimeout - 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