Class TextCommandFactory

  • All Implemented Interfaces:
    CommandFactory

    public class TextCommandFactory
    extends java.lang.Object
    implements CommandFactory
    Command Factory for creating text protocol commands.
    • Constructor Detail

      • TextCommandFactory

        public TextCommandFactory()
    • Method Detail

      • createDeleteCommand

        public final Command createDeleteCommand​(java.lang.String key,
                                                 byte[] keyBytes,
                                                 int time,
                                                 long cas,
                                                 boolean noreply)
        Description copied from interface: CommandFactory
        create a delete command
        Specified by:
        createDeleteCommand in interface CommandFactory
        Returns:
      • createVersionCommand

        public final Command createVersionCommand​(java.util.concurrent.CountDownLatch latch,
                                                  java.net.InetSocketAddress server)
        Description copied from interface: CommandFactory
        create a version command
        Specified by:
        createVersionCommand in interface CommandFactory
        Returns:
      • createFlushAllCommand

        public final Command createFlushAllCommand​(java.util.concurrent.CountDownLatch latch,
                                                   int exptime,
                                                   boolean noreply)
        Description copied from interface: CommandFactory
        create a flush_all command
        Specified by:
        createFlushAllCommand in interface CommandFactory
        Returns:
      • createVerbosityCommand

        public final Command createVerbosityCommand​(java.util.concurrent.CountDownLatch latch,
                                                    int level,
                                                    boolean noreply)
        Create verbosity command
        Specified by:
        createVerbosityCommand in interface CommandFactory
        Parameters:
        latch -
        level -
        noreply -
        Returns:
      • createStatsCommand

        public final Command createStatsCommand​(java.net.InetSocketAddress server,
                                                java.util.concurrent.CountDownLatch latch,
                                                java.lang.String itemName)
        Description copied from interface: CommandFactory
        create a stats command
        Specified by:
        createStatsCommand in interface CommandFactory
        Returns:
      • createStatsCachedumpCommand

        public final Command createStatsCachedumpCommand​(java.net.InetSocketAddress server,
                                                         java.util.concurrent.CountDownLatch latch,
                                                         int slabId,
                                                         int limit)
      • createCASCommand

        public final Command createCASCommand​(java.lang.String key,
                                              byte[] keyBytes,
                                              int exp,
                                              java.lang.Object value,
                                              long cas,
                                              boolean noreply,
                                              Transcoder transcoder)
        Description copied from interface: CommandFactory
        Create a cas command
        Specified by:
        createCASCommand in interface CommandFactory
        Returns:
      • createSetCommand

        public final Command createSetCommand​(java.lang.String key,
                                              byte[] keyBytes,
                                              int exp,
                                              java.lang.Object value,
                                              boolean noreply,
                                              Transcoder transcoder)
        Description copied from interface: CommandFactory
        Create a set command
        Specified by:
        createSetCommand in interface CommandFactory
        Returns:
      • createAddCommand

        public final Command createAddCommand​(java.lang.String key,
                                              byte[] keyBytes,
                                              int exp,
                                              java.lang.Object value,
                                              boolean noreply,
                                              Transcoder transcoder)
        Description copied from interface: CommandFactory
        create a add command
        Specified by:
        createAddCommand in interface CommandFactory
        Returns:
      • createReplaceCommand

        public final Command createReplaceCommand​(java.lang.String key,
                                                  byte[] keyBytes,
                                                  int exp,
                                                  java.lang.Object value,
                                                  boolean noreply,
                                                  Transcoder transcoder)
        Description copied from interface: CommandFactory
        create a replace command
        Specified by:
        createReplaceCommand in interface CommandFactory
        Returns:
      • createAppendCommand

        public final Command createAppendCommand​(java.lang.String key,
                                                 byte[] keyBytes,
                                                 java.lang.Object value,
                                                 boolean noreply,
                                                 Transcoder transcoder)
        Description copied from interface: CommandFactory
        create a append command
        Specified by:
        createAppendCommand in interface CommandFactory
        Returns:
      • createPrependCommand

        public final Command createPrependCommand​(java.lang.String key,
                                                  byte[] keyBytes,
                                                  java.lang.Object value,
                                                  boolean noreply,
                                                  Transcoder transcoder)
        Description copied from interface: CommandFactory
        Create a prepend command
        Specified by:
        createPrependCommand in interface CommandFactory
        Returns:
      • createStoreCommand

        final Command createStoreCommand​(java.lang.String key,
                                         byte[] keyBytes,
                                         int exp,
                                         java.lang.Object value,
                                         CommandType cmdType,
                                         boolean noreply,
                                         Transcoder transcoder)
      • createIncrDecrCommand

        public final Command createIncrDecrCommand​(java.lang.String key,
                                                   byte[] keyBytes,
                                                   long amount,
                                                   long initial,
                                                   int exptime,
                                                   CommandType cmdType,
                                                   boolean noreply)
        Description copied from interface: CommandFactory
        create a incr/decr command
        Specified by:
        createIncrDecrCommand in interface CommandFactory
        Returns:
      • createAuthStartCommand

        public Command createAuthStartCommand​(java.lang.String mechanism,
                                              java.util.concurrent.CountDownLatch latch,
                                              byte[] authData)
        Description copied from interface: CommandFactory
        Create command for starting authentication
        Specified by:
        createAuthStartCommand in interface CommandFactory
        Returns:
      • createAuthStepCommand

        public Command createAuthStepCommand​(java.lang.String mechanism,
                                             java.util.concurrent.CountDownLatch latch,
                                             byte[] authData)
        Description copied from interface: CommandFactory
        Create a command for stepping authentication
        Specified by:
        createAuthStepCommand in interface CommandFactory
        Returns:
      • createGetAndTouchCommand

        public Command createGetAndTouchCommand​(java.lang.String key,
                                                byte[] keyBytes,
                                                java.util.concurrent.CountDownLatch latch,
                                                int exp,
                                                boolean noreply)
        Description copied from interface: CommandFactory
        Create a get-and-touch command
        Specified by:
        createGetAndTouchCommand in interface CommandFactory
        latch - TODO
        Returns:
      • createTouchCommand

        public Command createTouchCommand​(java.lang.String key,
                                          byte[] keyBytes,
                                          java.util.concurrent.CountDownLatch latch,
                                          int exp,
                                          boolean noreply)
        Description copied from interface: CommandFactory
        Create a touch command
        Specified by:
        createTouchCommand in interface CommandFactory
        latch - TODO
        Returns: