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- Author:
- dennis
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTextGetCommand.ParseStatus
-
Field Summary
Fields Modifier and Type Field Description protected List<Command>assocCommandsWhen 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.protected Map<Object,Command>mergeCommandsprotected Map<String,CachedData>returnValuesprotected booleanwasFirst-
Fields 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
Constructors Constructor Description TextGetCommand(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleandecode(MemcachedTCPSession session, ByteBuffer buffer)abstract voiddispatch()voidencode()List<Command>getAssocCommands()Map<Object,Command>getMergeCommands()TextGetCommand.ParseStatusgetParseStatus()Map<String,CachedData>getReturnValues()voidsetAssocCommands(List<Command> assocCommands)voidsetMergeCommands(Map<Object,Command> mergeCommands)voidsetParseStatus(TextGetCommand.ParseStatus parseStatus)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 Detail
-
returnValues
protected Map<String,CachedData> returnValues
-
assocCommands
protected List<Command> 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.
-
wasFirst
protected boolean wasFirst
-
-
Constructor Detail
-
TextGetCommand
public TextGetCommand(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch)
-
-
Method Detail
-
getMergeCommands
public final Map<Object,Command> getMergeCommands()
- Specified by:
getMergeCommandsin interfaceMergeCommandsAware
-
setMergeCommands
public final void setMergeCommands(Map<Object,Command> mergeCommands)
- Specified by:
setMergeCommandsin interfaceMergeCommandsAware
-
getAssocCommands
public final List<Command> getAssocCommands()
- Specified by:
getAssocCommandsin interfaceAssocCommandAware
-
setAssocCommands
public final void setAssocCommands(List<Command> assocCommands)
- Specified by:
setAssocCommandsin interfaceAssocCommandAware
-
getParseStatus
public TextGetCommand.ParseStatus getParseStatus()
-
setParseStatus
public void setParseStatus(TextGetCommand.ParseStatus parseStatus)
-
decode
public final boolean decode(MemcachedTCPSession session, ByteBuffer buffer)
-
getReturnValues
public final Map<String,CachedData> getReturnValues()
- Specified by:
getReturnValuesin interfaceMapReturnValueAware
-
setReturnValues
public final void setReturnValues(Map<String,CachedData> returnValues)
-
dispatch
public abstract void dispatch()
-
-