Class CachedData
java.lang.Object
net.rubyeye.xmemcached.transcoders.CachedData
Cached data with its attributes.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCachedData
(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
Modifier and TypeMethodDescriptionfinal void
fillData
(ByteBuffer buffer, int length) final void
fillData
(ByteBuffer buffer, int offset, int length) final int
long
getCas()
final byte[]
getData()
Get the stored data.final int
getFlag()
Get the flags stored along with this value.static final int
final int
getSize()
int
final void
setCapacity
(int dataLen) final void
setCas
(long cas) final void
setData
(byte[] data) final void
setFlag
(int flags) final void
setSize
(int size) toString()
-
Field Details
-
MAX_SIZE
public static final int MAX_SIZEMaximum data size allowed by memcached. -
flag
protected int flag -
cas
protected long cas -
capacity
private int capacity -
size
protected int size -
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 Details
-
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 Details
-
getSize
public final int getSize() -
fillData
-
fillData
-
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
-
remainingCapacity
public int remainingCapacity()
-