Class CachedData
- java.lang.Object
-
- net.rubyeye.xmemcached.transcoders.CachedData
-
public final class CachedData extends java.lang.Object
Cached data with its attributes.
-
-
Constructor Summary
Constructors Constructor Description CachedData()
CachedData(int f, byte[] d)
Get a CachedData instance for the given flags and byte array.CachedData(int f, byte[] d, int capacity, long casId)
Get a CachedData instance for the given flags and byte array.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fillData(java.nio.ByteBuffer buffer, int length)
void
fillData(java.nio.ByteBuffer buffer, int offset, int length)
int
getCapacity()
long
getCas()
byte[]
getData()
Get the stored data.int
getFlag()
Get the flags stored along with this value.static int
getMAX_SIZE()
int
getSize()
int
remainingCapacity()
void
setCapacity(int dataLen)
void
setCas(long cas)
void
setData(byte[] data)
void
setFlag(int flags)
void
setSize(int size)
java.lang.String
toString()
-
-
-
Field Detail
-
MAX_SIZE
public static final int MAX_SIZE
Maximum data size allowed by memcached.
-
flag
protected int flag
-
cas
protected long cas
-
capacity
private int capacity
-
size
protected int size
-
decodedObject
public volatile java.lang.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 flagsd
- the datacapacity
- 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 flagsd
- the data
-
-
Method Detail
-
getSize
public final int getSize()
-
fillData
public final void fillData(java.nio.ByteBuffer buffer, int offset, int length)
-
fillData
public final void fillData(java.nio.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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
remainingCapacity
public int remainingCapacity()
-
-