public final class CachedData extends Object
Modifier and Type | Field and Description |
---|---|
protected long |
cas |
protected byte[] |
data |
Object |
decodedObject |
protected int |
flag |
static int |
MAX_SIZE
Maximum data size allowed by memcached.
|
long |
p1 |
long |
p2 |
long |
p3 |
long |
p4 |
int |
p5 |
protected int |
size |
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
void |
fillData(ByteBuffer buffer,
int length) |
void |
fillData(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) |
String |
toString() |
public static final int MAX_SIZE
protected int flag
protected long cas
protected int size
public volatile Object decodedObject
public long p1
public long p2
public long p3
public long p4
public int p5
protected byte[] data
public CachedData()
public CachedData(int f, byte[] d, int capacity, long casId)
f
- the flagsd
- the datacapacity
- the maximum allowable size.public CachedData(int f, byte[] d)
f
- the flagsd
- the datapublic final int getSize()
public final void fillData(ByteBuffer buffer, int offset, int length)
public final void fillData(ByteBuffer buffer, int length)
public final int getCapacity()
public final void setSize(int size)
public final void setCapacity(int dataLen)
public static final int getMAX_SIZE()
public final void setFlag(int flags)
public final void setData(byte[] data)
public final void setCas(long cas)
public long getCas()
public final byte[] getData()
public final int getFlag()
public int remainingCapacity()
Copyright © 2021. All rights reserved.