public class TextCommandFactory extends Object implements CommandFactory
Constructor and Description |
---|
TextCommandFactory() |
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 exptime,
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 |
createStatsCachedumpCommand(InetSocketAddress server,
CountDownLatch latch,
int slabId,
int limit) |
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 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 final Command createDeleteCommand(String key, byte[] keyBytes, int time, long cas, boolean noreply)
CommandFactory
createDeleteCommand
in interface CommandFactory
public final Command createVersionCommand(CountDownLatch latch, InetSocketAddress server)
CommandFactory
createVersionCommand
in interface CommandFactory
public final Command createFlushAllCommand(CountDownLatch latch, int exptime, boolean noreply)
CommandFactory
createFlushAllCommand
in interface CommandFactory
public final Command createVerbosityCommand(CountDownLatch latch, int level, boolean noreply)
createVerbosityCommand
in interface CommandFactory
latch
- level
- noreply
- public final Command createStatsCommand(InetSocketAddress server, CountDownLatch latch, String itemName)
CommandFactory
createStatsCommand
in interface CommandFactory
public final Command createStatsCachedumpCommand(InetSocketAddress server, CountDownLatch latch, int slabId, int limit)
public final Command createCASCommand(String key, byte[] keyBytes, int exp, Object value, long cas, boolean noreply, Transcoder transcoder)
CommandFactory
createCASCommand
in interface CommandFactory
public final Command createSetCommand(String key, byte[] keyBytes, int exp, Object value, boolean noreply, Transcoder transcoder)
CommandFactory
createSetCommand
in interface CommandFactory
public final Command createAddCommand(String key, byte[] keyBytes, int exp, Object value, boolean noreply, Transcoder transcoder)
CommandFactory
createAddCommand
in interface CommandFactory
public final Command createReplaceCommand(String key, byte[] keyBytes, int exp, Object value, boolean noreply, Transcoder transcoder)
CommandFactory
createReplaceCommand
in interface CommandFactory
public final Command createAppendCommand(String key, byte[] keyBytes, Object value, boolean noreply, Transcoder transcoder)
CommandFactory
createAppendCommand
in interface CommandFactory
public final Command createPrependCommand(String key, byte[] keyBytes, Object value, boolean noreply, Transcoder transcoder)
CommandFactory
createPrependCommand
in interface CommandFactory
public final Command createGetCommand(String key, byte[] keyBytes, CommandType cmdType, Transcoder transcoder)
CommandFactory
createGetCommand
in interface CommandFactory
cmdType
- 命令类型transcoder
- TODOpublic final <T> Command createGetMultiCommand(Collection<String> keys, CountDownLatch latch, CommandType cmdType, Transcoder<T> transcoder)
CommandFactory
createGetMultiCommand
in interface CommandFactory
public final Command createIncrDecrCommand(String key, byte[] keyBytes, long amount, long initial, int exptime, CommandType cmdType, boolean noreply)
CommandFactory
createIncrDecrCommand
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.