Class TextGetCommand
java.lang.Object
net.rubyeye.xmemcached.command.Command
net.rubyeye.xmemcached.command.text.TextGetCommand
- All Implemented Interfaces:
WriteMessage,AssocCommandAware,MapReturnValueAware,MergeCommandsAware
- Direct Known Subclasses:
KestrelGetCommand,TextGetMultiCommand,TextGetOneCommand
public abstract class TextGetCommand
extends Command
implements MergeCommandsAware, AssocCommandAware, MapReturnValueAware
Abstract get command for text protocol
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final char[]When MemcachedClient merge get commands,those commans which have the same key will be merged into one get command.The result command's assocCommands contains all these commands with the same key.private Stringprivate static final char[]private intprivate TextGetCommand.ParseStatusprotected Map<String, CachedData> protected booleanFields inherited from class net.rubyeye.xmemcached.command.Command
cancel, commandType, exception, ioBuffer, key, keyBytes, latch, mergeCount, noreply, REQUEST_MAGIC_NUMBER, RESPONSE_MAGIC_NUMBER, result, status, transcoder, writeFuture -
Constructor Summary
ConstructorsConstructorDescriptionTextGetCommand(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleandecode(MemcachedTCPSession session, ByteBuffer buffer) abstract voiddispatch()voidencode()private StringgetItem(ByteBuffer buffer, char token, char[] others) final Map<String, CachedData> private StringgetString(byte[] keyBytes) private booleanisIn(byte b, char[] others) final voidsetAssocCommands(List<Command> assocCommands) final voidsetMergeCommands(Map<Object, Command> mergeCommands) voidsetParseStatus(TextGetCommand.ParseStatus parseStatus) final voidsetReturnValues(Map<String, CachedData> returnValues) Methods inherited from class net.rubyeye.xmemcached.command.Command
cancel, countDownLatch, decodeError, decodeError, decodeError, decodeError, getCommandType, getCopiedMergeCount, getException, getIoBuffer, getKey, getKeyBytes, getLatch, getMergeCount, getMessage, getResult, getStatus, getTranscoder, getWriteBuffer, getWriteFuture, isAdded, isCancel, isNoreply, isWriting, setAdded, setCommandType, setException, setIoBuffer, setKey, setKeyBytes, setLatch, setMergeCount, setNoreply, setResult, setStatus, setTranscoder, setWriteBuffer, setWriteFuture, toString, writing
-
Field Details
-
A_SPACE
private static final char[] A_SPACE -
EMPTY_CHARS
private static final char[] EMPTY_CHARS -
returnValues
-
currentReturnKey
-
offset
private int offset -
assocCommands
When MemcachedClient merge get commands,those commans which have the same key will be merged into one get command.The result command's assocCommands contains all these commands with the same key. -
mergeCommands
-
parseStatus
-
wasFirst
protected boolean wasFirst
-
-
Constructor Details
-
TextGetCommand
-
-
Method Details
-
getMergeCommands
- Specified by:
getMergeCommandsin interfaceMergeCommandsAware
-
setMergeCommands
- Specified by:
setMergeCommandsin interfaceMergeCommandsAware
-
getAssocCommands
- Specified by:
getAssocCommandsin interfaceAssocCommandAware
-
setAssocCommands
- Specified by:
setAssocCommandsin interfaceAssocCommandAware
-
getParseStatus
-
setParseStatus
-
decode
-
getItem
-
isIn
private boolean isIn(byte b, char[] others) -
getString
-
getReturnValues
- Specified by:
getReturnValuesin interfaceMapReturnValueAware
-
setReturnValues
-
dispatch
public abstract void dispatch() -
encode
public void encode()
-