Class BaseBinaryCommand

    • Field Detail

      • expTime

        protected int expTime
      • cas

        protected long cas
      • value

        protected java.lang.Object value
      • opCode

        protected OpCode opCode
      • responseKeyLength

        protected int responseKeyLength
      • responseExtrasLength

        protected int responseExtrasLength
      • responseTotalBodyLength

        protected int responseTotalBodyLength
      • opaque

        protected int opaque
      • vbucketId

        protected short vbucketId
      • EXTRAS_LENGTH

        static final byte EXTRAS_LENGTH
        Set,add,replace protocol's extras length
        See Also:
        Constant Field Values
    • Constructor Detail

      • BaseBinaryCommand

        public BaseBinaryCommand​(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()
      • getOpaque

        public int getOpaque()
      • setOpaque

        public void setOpaque​(int opaque)
      • setCas

        public final void setCas​(long cas)
      • getValue

        public final java.lang.Object getValue()
        Specified by:
        getValue in interface StoreCommand
      • setValue

        public final void setValue​(java.lang.Object value)
        Specified by:
        setValue in interface StoreCommand
      • finish

        protected boolean finish()
      • readHeader

        protected void readHeader​(java.nio.ByteBuffer buffer)
      • markBuffer

        private void markBuffer​(java.nio.ByteBuffer buffer)
      • readOpaque

        protected boolean readOpaque​(java.nio.ByteBuffer buffer)
      • readCAS

        protected long readCAS​(java.nio.ByteBuffer buffer)
      • readKey

        protected boolean readKey​(java.nio.ByteBuffer buffer,
                                  int keyLength)
      • readValue

        protected boolean readValue​(java.nio.ByteBuffer buffer,
                                    int bodyLength,
                                    int keyLength,
                                    int extrasLength)
      • readExtras

        protected boolean readExtras​(java.nio.ByteBuffer buffer,
                                     int extrasLength)
      • readBodyLength

        private int readBodyLength​(java.nio.ByteBuffer buffer)
      • readStatus

        protected void readStatus​(java.nio.ByteBuffer buffer)
      • getOpCode

        public final OpCode getOpCode()
      • setOpCode

        public final void setOpCode​(OpCode opCode)
      • setResponseStatus

        public final void setResponseStatus​(ResponseStatus responseStatus)
      • readKeyLength

        private int readKeyLength​(java.nio.ByteBuffer buffer)
      • readExtrasLength

        private int readExtrasLength​(java.nio.ByteBuffer buffer)
      • readDataType

        private byte readDataType​(java.nio.ByteBuffer buffer)
      • readOpCode

        protected boolean readOpCode​(java.nio.ByteBuffer buffer)
      • readMagicNumber

        private void readMagicNumber​(java.nio.ByteBuffer buffer)
      • encode

        public void encode()
        Specified by:
        encode in class Command
      • fillValue

        protected void fillValue​(CachedData data)
      • fillKey

        protected void fillKey()
      • fillExtras

        protected void fillExtras​(CachedData data)
      • fillHeader

        private void fillHeader​(CachedData data)
      • getCasValue

        protected long getCasValue()
      • getValueLength

        protected int getValueLength​(CachedData data)
      • getKeyLength

        protected short getKeyLength()
      • getExtrasLength

        protected byte getExtrasLength()