public abstract class CacheObjectAdapter extends Object implements CacheObject, Externalizable
| Modifier and Type | Field and Description |
|---|---|
protected Object |
val |
protected byte[] |
valBytes |
TYPE_BINARY, TYPE_BINARY_ENUM, TYPE_BYTE_ARR, TYPE_REGULARDIRECT_TYPE_SIZE| Constructor and Description |
|---|
CacheObjectAdapter() |
| Modifier and Type | Method and Description |
|---|---|
byte |
cacheObjectType() |
byte |
fieldsCount()
Gets fields count.
|
protected boolean |
needCopy(CacheObjectValueContext ctx) |
static int |
objectPutSize(int dataLen) |
boolean |
putValue(ByteBuffer buf) |
boolean |
putValue(ByteBuffer buf,
int off,
int len) |
static boolean |
putValue(byte cacheObjType,
ByteBuffer buf,
int off,
int len,
byte[] valBytes,
int start) |
int |
putValue(long addr) |
static int |
putValue(long addr,
byte type,
byte[] valBytes,
int valOff) |
void |
readExternal(ObjectInput in) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
String |
toString() |
int |
valueBytesLength(CacheObjectContext ctx) |
void |
writeExternal(ObjectOutput out) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfinishUnmarshal, isPlatformType, prepareForCache, prepareMarshal, value, valueBytesdirectType, onAckReceived@GridToStringInclude(sensitive=true) protected Object val
protected byte[] valBytes
protected boolean needCopy(CacheObjectValueContext ctx)
ctx - Context.True need to copy value returned to user.public byte cacheObjectType()
cacheObjectType in interface CacheObjectpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic boolean putValue(ByteBuffer buf) throws IgniteCheckedException
putValue in interface CacheObjectbuf - Buffer to write value to.True if value was successfully written, false if there was not enough space in the
buffer.IgniteCheckedException - If failed.public int putValue(long addr)
throws IgniteCheckedException
putValue in interface CacheObjectaddr - Address tp write value to.IgniteCheckedException - If failed.public static int putValue(long addr,
byte type,
byte[] valBytes,
int valOff)
addr - Write address.type - Object type.valBytes - Value bytes array.valOff - Value bytes array offset.public boolean putValue(ByteBuffer buf, int off, int len) throws IgniteCheckedException
putValue in interface CacheObjectbuf - Buffer to write value to.off - Offset in source binary data.len - Length of the data to write.True if value was successfully written, false if there was not enough space in the
buffer.IgniteCheckedException - If failed.public int valueBytesLength(CacheObjectContext ctx) throws IgniteCheckedException
valueBytesLength in interface CacheObjectctx - Cache object context.IgniteCheckedException - If failed.public boolean readFrom(ByteBuffer buf, MessageReader reader)
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
public byte fieldsCount()
fieldsCount in interface Messagepublic static int objectPutSize(int dataLen)
dataLen - Serialized value length.putValue(byte, ByteBuffer, int, int, byte[], int)public static boolean putValue(byte cacheObjType,
ByteBuffer buf,
int off,
int len,
byte[] valBytes,
int start)
throws IgniteCheckedException
cacheObjType - Cache object type.buf - Buffer to write value to.off - Offset in source binary data.len - Length of the data to write.valBytes - Binary data.start - Start offset in binary data.True if data were successfully written.IgniteCheckedException - If failed.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.1 Release Date : May 21 2020