Class CachedData


  • public final class CachedData
    extends Object
    Cached data with its attributes.
    • Field Detail

      • MAX_SIZE

        public static final int MAX_SIZE
        Maximum data size allowed by memcached.
      • flag

        protected int flag
      • cas

        protected long cas
      • size

        protected int size
      • decodedObject

        public volatile Object decodedObject
      • p1

        public long p1
      • p2

        public long p2
      • p3

        public long p3
      • p4

        public long p4
      • p5

        public int p5
      • data

        protected byte[] data
    • Constructor Detail

      • CachedData

        public CachedData()
      • CachedData

        public CachedData​(int f,
                          byte[] d,
                          int capacity,
                          long casId)
        Get a CachedData instance for the given flags and byte array.
        Parameters:
        f - the flags
        d - the data
        capacity - the maximum allowable size.
      • CachedData

        public CachedData​(int f,
                          byte[] d)
        Get a CachedData instance for the given flags and byte array.
        Parameters:
        f - the flags
        d - the data
    • Method Detail

      • getSize

        public final int getSize()
      • fillData

        public final void fillData​(ByteBuffer buffer,
                                   int offset,
                                   int length)
      • fillData

        public final void fillData​(ByteBuffer buffer,
                                   int length)
      • getCapacity

        public final int getCapacity()
      • setSize

        public final void setSize​(int size)
      • setCapacity

        public final void setCapacity​(int dataLen)
      • getMAX_SIZE

        public static final int getMAX_SIZE()
      • setFlag

        public final void setFlag​(int flags)
      • setData

        public final void setData​(byte[] data)
      • setCas

        public final void setCas​(long cas)
      • getCas

        public long getCas()
      • getData

        public final byte[] getData()
        Get the stored data.
      • getFlag

        public final int getFlag()
        Get the flags stored along with this value.
      • remainingCapacity

        public int remainingCapacity()