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 voidfillData(ByteBuffer buffer, int length) final voidfillData(ByteBuffer buffer, int offset, int length) final intlonggetCas()final byte[]getData()Get the stored data.final intgetFlag()Get the flags stored along with this value.static final intfinal intgetSize()intfinal voidsetCapacity(int dataLen) final voidsetCas(long cas) final voidsetData(byte[] data) final voidsetFlag(int flags) final voidsetSize(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()
-