Class TextStoreCommand
- java.lang.Object
-
- net.rubyeye.xmemcached.command.Command
-
- net.rubyeye.xmemcached.command.text.TextStoreCommand
-
- All Implemented Interfaces:
WriteMessage
,StoreCommand
- Direct Known Subclasses:
KestrelSetCommand
,TextCASCommand
public class TextStoreCommand extends Command implements StoreCommand
Store command for text protocol
-
-
Field Summary
Fields Modifier and Type Field Description protected long
cas
protected int
expTime
protected java.lang.Object
value
-
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 TextStoreCommand(java.lang.String key, byte[] keyBytes, CommandType cmdType, java.util.concurrent.CountDownLatch latch, int exp, long cas, java.lang.Object value, boolean noreply, Transcoder transcoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
decode(MemcachedTCPSession session, java.nio.ByteBuffer buffer)
void
encode()
protected CachedData
encodeValue()
long
getCas()
private java.lang.String
getCommandName()
int
getExpTime()
Transcoder
getTranscoder()
java.lang.Object
getValue()
void
setCas(long cas)
void
setExpTime(int exp)
void
setTranscoder(Transcoder transcoder)
void
setValue(java.lang.Object value)
-
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, getWriteBuffer, getWriteFuture, isAdded, isCancel, isNoreply, isWriting, setAdded, setCommandType, setException, setIoBuffer, setKey, setKeyBytes, setLatch, setMergeCount, setNoreply, setResult, setStatus, setWriteBuffer, setWriteFuture, toString, writing
-
-
-
-
Constructor Detail
-
TextStoreCommand
public TextStoreCommand(java.lang.String key, byte[] keyBytes, CommandType cmdType, java.util.concurrent.CountDownLatch latch, int exp, long cas, java.lang.Object value, boolean noreply, Transcoder transcoder)
-
-
Method Detail
-
getExpTime
public final int getExpTime()
-
setExpTime
public final void setExpTime(int exp)
-
getCas
public final long getCas()
-
setCas
public final void setCas(long cas)
-
getValue
public final java.lang.Object getValue()
- Specified by:
getValue
in interfaceStoreCommand
-
setValue
public final void setValue(java.lang.Object value)
- Specified by:
setValue
in interfaceStoreCommand
-
getTranscoder
public final Transcoder getTranscoder()
- Overrides:
getTranscoder
in classCommand
-
setTranscoder
public final void setTranscoder(Transcoder transcoder)
- Overrides:
setTranscoder
in classCommand
-
decode
public boolean decode(MemcachedTCPSession session, java.nio.ByteBuffer buffer)
-
getCommandName
private java.lang.String getCommandName()
-
encodeValue
protected CachedData encodeValue()
-
-