Class CommandInfo


  • public class CommandInfo
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      CommandInfo​(long arity, java.util.List<java.lang.String> flags, long firstKey, long lastKey, long step, java.util.List<java.lang.String> aclCategories, java.util.List<java.lang.String> tips, java.util.List<java.lang.String> subcommands)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getAclCategories()
      An array of simple strings that are the ACL categories to which the command belongs
      long getArity()
      Arity is the number of arguments a command expects.
      long getFirstKey()
      The position of the command's first key name argument
      java.util.List<java.lang.String> getFlags()
      Command flags
      long getLastKey()
      The position of the command's last key name argument Commands that accept a single key have both first key and last key set to 1
      long getStep()
      This value is the step, or increment, between the first key and last key values where the keys are
      java.util.List<java.lang.String> getSubcommands()
      All the command's subcommands, if any
      java.util.List<java.lang.String> getTips()
      Helpful information about the command
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommandInfo

        public CommandInfo​(long arity,
                           java.util.List<java.lang.String> flags,
                           long firstKey,
                           long lastKey,
                           long step,
                           java.util.List<java.lang.String> aclCategories,
                           java.util.List<java.lang.String> tips,
                           java.util.List<java.lang.String> subcommands)
    • Method Detail

      • getArity

        public long getArity()
        Arity is the number of arguments a command expects. It follows a simple pattern: A positive integer means a fixed number of arguments. A negative integer means a minimal number of arguments.

        Examples:

        GET's arity is 2 since the command only accepts one argument and always has the format GET _key_. MGET's arity is -2 since the command accepts at least one argument, but possibly multiple ones: MGET _key1_ [key2] [key3] ....

      • getFlags

        public java.util.List<java.lang.String> getFlags()
        Command flags
      • getFirstKey

        public long getFirstKey()
        The position of the command's first key name argument
      • getLastKey

        public long getLastKey()
        The position of the command's last key name argument Commands that accept a single key have both first key and last key set to 1
      • getStep

        public long getStep()
        This value is the step, or increment, between the first key and last key values where the keys are
      • getAclCategories

        public java.util.List<java.lang.String> getAclCategories()
        An array of simple strings that are the ACL categories to which the command belongs
      • getTips

        public java.util.List<java.lang.String> getTips()
        Helpful information about the command
      • getSubcommands

        public java.util.List<java.lang.String> getSubcommands()
        All the command's subcommands, if any