net.rubyeye.xmemcached.command
类 KestrelCommandFactory

java.lang.Object
  继承者 net.rubyeye.xmemcached.command.KestrelCommandFactory
所有已实现的接口:
CommandFactory

public class KestrelCommandFactory
extends Object
implements CommandFactory

Kestrel is a message queue written in scala by robey(http://github.com/robey/kestrel).It's protocol use memcached text protocol,so you can use any memcached clients to talk with it.But it's protocol implementation is not all compatible with memcached standard protocol,So xmemcached supply this command factory for it.

作者:
dennis

构造方法摘要
KestrelCommandFactory()
           
 
方法摘要
 Command createAddCommand(String key, byte[] keyBytes, int exp, Object value, boolean noreply, Transcoder transcoder)
          create a add command
 Command createAppendCommand(String key, byte[] keyBytes, Object value, boolean noreply, Transcoder transcoder)
          create a append command
 Command createAuthListMechanismsCommand(CountDownLatch latch)
          Create a command for listing authentication mechanisms
 Command createAuthStartCommand(String mechanism, CountDownLatch latch, byte[] authData)
          Create command for starting authentication
 Command createAuthStepCommand(String mechanism, CountDownLatch latch, byte[] authData)
          Create a command for stepping authentication
 Command createCASCommand(String key, byte[] keyBytes, int exp, Object value, long cas, boolean noreply, Transcoder transcoder)
          Create a cas command
 Command createDeleteCommand(String key, byte[] keyBytes, int time, boolean noreply)
          create a delete command
 Command createFlushAllCommand(CountDownLatch latch, int delay, boolean noreply)
          create a flush_all command
 Command createGetAndTouchCommand(String key, byte[] keyBytes, CountDownLatch latch, int exp, boolean noreply)
          Create a get-and-touch command
 Command createGetCommand(String key, byte[] keyBytes, CommandType cmdType, Transcoder transcoder)
          create a get/gets command
<T> Command
createGetMultiCommand(Collection<String> keys, CountDownLatch latch, CommandType cmdType, Transcoder<T> transcoder)
          Create a multi-get command
 Command createIncrDecrCommand(String key, byte[] keyBytes, long amount, long initial, int expTime, CommandType cmdType, boolean noreply)
          create a incr/decr command
 Command createPrependCommand(String key, byte[] keyBytes, Object value, boolean noreply, Transcoder transcoder)
          Create a prepend command
 Command createQuitCommand()
          create a quit command
 Command createReplaceCommand(String key, byte[] keyBytes, int exp, Object value, boolean noreply, Transcoder transcoder)
          create a replace command
 Command createSetCommand(String key, byte[] keyBytes, int exp, Object value, boolean noreply, Transcoder transcoder)
          Create a set command
 Command createStatsCommand(InetSocketAddress server, CountDownLatch latch, String itemName)
          create a stats command
 Command createTouchCommand(String key, byte[] keyBytes, CountDownLatch latch, int exp, boolean noreply)
          Create a touch command
 Command createVerbosityCommand(CountDownLatch latch, int level, boolean noreply)
          Create a verbosity command
 Command createVersionCommand(CountDownLatch latch, InetSocketAddress server)
          create a version command
 Protocol getProtocol()
          Get this client's protocol version
 void setBufferAllocator(BufferAllocator bufferAllocator)
          set command factory's buffer allocator
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

KestrelCommandFactory

public KestrelCommandFactory()
方法详细信息

createAddCommand

public Command createAddCommand(String key,
                                byte[] keyBytes,
                                int exp,
                                Object value,
                                boolean noreply,
                                Transcoder transcoder)
从接口 CommandFactory 复制的描述
create a add command

指定者:
接口 CommandFactory 中的 createAddCommand
返回:

createAppendCommand

public Command createAppendCommand(String key,
                                   byte[] keyBytes,
                                   Object value,
                                   boolean noreply,
                                   Transcoder transcoder)
从接口 CommandFactory 复制的描述
create a append command

指定者:
接口 CommandFactory 中的 createAppendCommand
返回:

createCASCommand

public Command createCASCommand(String key,
                                byte[] keyBytes,
                                int exp,
                                Object value,
                                long cas,
                                boolean noreply,
                                Transcoder transcoder)
从接口 CommandFactory 复制的描述
Create a cas command

指定者:
接口 CommandFactory 中的 createCASCommand
返回:

createDeleteCommand

public Command createDeleteCommand(String key,
                                   byte[] keyBytes,
                                   int time,
                                   boolean noreply)
从接口 CommandFactory 复制的描述
create a delete command

指定者:
接口 CommandFactory 中的 createDeleteCommand
返回:

createFlushAllCommand

public Command createFlushAllCommand(CountDownLatch latch,
                                     int delay,
                                     boolean noreply)
从接口 CommandFactory 复制的描述
create a flush_all command

指定者:
接口 CommandFactory 中的 createFlushAllCommand
返回:

createGetCommand

public Command createGetCommand(String key,
                                byte[] keyBytes,
                                CommandType cmdType,
                                Transcoder transcoder)
从接口 CommandFactory 复制的描述
create a get/gets command

指定者:
接口 CommandFactory 中的 createGetCommand
cmdType - 命令类型
transcoder - TODO
返回:

createGetMultiCommand

public <T> Command createGetMultiCommand(Collection<String> keys,
                                         CountDownLatch latch,
                                         CommandType cmdType,
                                         Transcoder<T> transcoder)
从接口 CommandFactory 复制的描述
Create a multi-get command

指定者:
接口 CommandFactory 中的 createGetMultiCommand
返回:

createIncrDecrCommand

public Command createIncrDecrCommand(String key,
                                     byte[] keyBytes,
                                     long amount,
                                     long initial,
                                     int expTime,
                                     CommandType cmdType,
                                     boolean noreply)
从接口 CommandFactory 复制的描述
create a incr/decr command

指定者:
接口 CommandFactory 中的 createIncrDecrCommand
返回:

createPrependCommand

public Command createPrependCommand(String key,
                                    byte[] keyBytes,
                                    Object value,
                                    boolean noreply,
                                    Transcoder transcoder)
从接口 CommandFactory 复制的描述
Create a prepend command

指定者:
接口 CommandFactory 中的 createPrependCommand
返回:

createReplaceCommand

public Command createReplaceCommand(String key,
                                    byte[] keyBytes,
                                    int exp,
                                    Object value,
                                    boolean noreply,
                                    Transcoder transcoder)
从接口 CommandFactory 复制的描述
create a replace command

指定者:
接口 CommandFactory 中的 createReplaceCommand
返回:

createSetCommand

public Command createSetCommand(String key,
                                byte[] keyBytes,
                                int exp,
                                Object value,
                                boolean noreply,
                                Transcoder transcoder)
从接口 CommandFactory 复制的描述
Create a set command

指定者:
接口 CommandFactory 中的 createSetCommand
返回:

createStatsCommand

public Command createStatsCommand(InetSocketAddress server,
                                  CountDownLatch latch,
                                  String itemName)
从接口 CommandFactory 复制的描述
create a stats command

指定者:
接口 CommandFactory 中的 createStatsCommand
返回:

createVerbosityCommand

public Command createVerbosityCommand(CountDownLatch latch,
                                      int level,
                                      boolean noreply)
从接口 CommandFactory 复制的描述
Create a verbosity command

指定者:
接口 CommandFactory 中的 createVerbosityCommand
返回:

createVersionCommand

public Command createVersionCommand(CountDownLatch latch,
                                    InetSocketAddress server)
从接口 CommandFactory 复制的描述
create a version command

指定者:
接口 CommandFactory 中的 createVersionCommand
返回:

createQuitCommand

public Command createQuitCommand()
从接口 CommandFactory 复制的描述
create a quit command

指定者:
接口 CommandFactory 中的 createQuitCommand
返回:

getProtocol

public Protocol getProtocol()
从接口 CommandFactory 复制的描述
Get this client's protocol version

指定者:
接口 CommandFactory 中的 getProtocol
返回:

createAuthListMechanismsCommand

public Command createAuthListMechanismsCommand(CountDownLatch latch)
从接口 CommandFactory 复制的描述
Create a command for listing authentication mechanisms

指定者:
接口 CommandFactory 中的 createAuthListMechanismsCommand
返回:

createAuthStartCommand

public Command createAuthStartCommand(String mechanism,
                                      CountDownLatch latch,
                                      byte[] authData)
从接口 CommandFactory 复制的描述
Create command for starting authentication

指定者:
接口 CommandFactory 中的 createAuthStartCommand
返回:

createAuthStepCommand

public Command createAuthStepCommand(String mechanism,
                                     CountDownLatch latch,
                                     byte[] authData)
从接口 CommandFactory 复制的描述
Create a command for stepping authentication

指定者:
接口 CommandFactory 中的 createAuthStepCommand
返回:

createGetAndTouchCommand

public Command createGetAndTouchCommand(String key,
                                        byte[] keyBytes,
                                        CountDownLatch latch,
                                        int exp,
                                        boolean noreply)
从接口 CommandFactory 复制的描述
Create a get-and-touch command

指定者:
接口 CommandFactory 中的 createGetAndTouchCommand
latch - TODO
返回:

createTouchCommand

public Command createTouchCommand(String key,
                                  byte[] keyBytes,
                                  CountDownLatch latch,
                                  int exp,
                                  boolean noreply)
从接口 CommandFactory 复制的描述
Create a touch command

指定者:
接口 CommandFactory 中的 createTouchCommand
latch - TODO
返回:

setBufferAllocator

public void setBufferAllocator(BufferAllocator bufferAllocator)
从接口 CommandFactory 复制的描述
set command factory's buffer allocator

指定者:
接口 CommandFactory 中的 setBufferAllocator


Copyright © 2013. All Rights Reserved.