public class BinaryCommandFactory extends Object implements CommandFactory
Constructor and Description |
---|
BinaryCommandFactory() |
Modifier and Type | Method and Description |
---|---|
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 |
createAWSElasticCacheConfigCommand(String subCommand,
String key)
Create a AWS ElasticCache config command, only supports Cache Engine Version 1.4.14 or Higher.
|
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,
long cas,
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
|
public Command createAWSElasticCacheConfigCommand(String subCommand, String key)
CommandFactory
createAWSElasticCacheConfigCommand
in interface CommandFactory
public void setBufferAllocator(BufferAllocator bufferAllocator)
CommandFactory
setBufferAllocator
in interface CommandFactory
public Command createAddCommand(String key, byte[] keyBytes, int exp, Object value, boolean noreply, Transcoder transcoder)
CommandFactory
createAddCommand
in interface CommandFactory
public Command createAppendCommand(String key, byte[] keyBytes, Object value, boolean noreply, Transcoder transcoder)
CommandFactory
createAppendCommand
in interface CommandFactory
public Command createCASCommand(String key, byte[] keyBytes, int exp, Object value, long cas, boolean noreply, Transcoder transcoder)
CommandFactory
createCASCommand
in interface CommandFactory
public Command createDeleteCommand(String key, byte[] keyBytes, int time, long cas, boolean noreply)
CommandFactory
createDeleteCommand
in interface CommandFactory
public Command createFlushAllCommand(CountDownLatch latch, int delay, boolean noreply)
CommandFactory
createFlushAllCommand
in interface CommandFactory
public Command createGetCommand(String key, byte[] keyBytes, CommandType cmdType, Transcoder transcoder)
CommandFactory
createGetCommand
in interface CommandFactory
cmdType
- 命令类型transcoder
- TODOpublic <T> Command createGetMultiCommand(Collection<String> keys, CountDownLatch latch, CommandType cmdType, Transcoder<T> transcoder)
CommandFactory
createGetMultiCommand
in interface CommandFactory
public Command createIncrDecrCommand(String key, byte[] keyBytes, long amount, long initial, int expTime, CommandType cmdType, boolean noreply)
CommandFactory
createIncrDecrCommand
in interface CommandFactory
public Command createPrependCommand(String key, byte[] keyBytes, Object value, boolean noreply, Transcoder transcoder)
CommandFactory
createPrependCommand
in interface CommandFactory
public Command createReplaceCommand(String key, byte[] keyBytes, int exp, Object value, boolean noreply, Transcoder transcoder)
CommandFactory
createReplaceCommand
in interface CommandFactory
public Command createSetCommand(String key, byte[] keyBytes, int exp, Object value, boolean noreply, Transcoder transcoder)
CommandFactory
createSetCommand
in interface CommandFactory
public Command createStatsCommand(InetSocketAddress server, CountDownLatch latch, String itemName)
CommandFactory
createStatsCommand
in interface CommandFactory
public Command createVerbosityCommand(CountDownLatch latch, int level, boolean noreply)
CommandFactory
createVerbosityCommand
in interface CommandFactory
public Command createVersionCommand(CountDownLatch latch, InetSocketAddress server)
CommandFactory
createVersionCommand
in interface CommandFactory
public Command createAuthListMechanismsCommand(CountDownLatch latch)
CommandFactory
createAuthListMechanismsCommand
in interface CommandFactory
public Command createAuthStartCommand(String mechanism, CountDownLatch latch, byte[] authData)
CommandFactory
createAuthStartCommand
in interface CommandFactory
public Command createAuthStepCommand(String mechanism, CountDownLatch latch, byte[] authData)
CommandFactory
createAuthStepCommand
in interface CommandFactory
public Command createGetAndTouchCommand(String key, byte[] keyBytes, CountDownLatch latch, int exp, boolean noreply)
CommandFactory
createGetAndTouchCommand
in interface CommandFactory
latch
- TODOpublic Command createTouchCommand(String key, byte[] keyBytes, CountDownLatch latch, int exp, boolean noreply)
CommandFactory
createTouchCommand
in interface CommandFactory
latch
- TODOpublic Command createQuitCommand()
CommandFactory
createQuitCommand
in interface CommandFactory
public Protocol getProtocol()
CommandFactory
getProtocol
in interface CommandFactory
Copyright © 2021. All rights reserved.