public interface CacheObject extends Message
Modifier and Type | Field and Description |
---|---|
static byte |
TYPE_BINARY |
static byte |
TYPE_BINARY_ENUM |
static byte |
TYPE_BYTE_ARR |
static byte |
TYPE_REGULAR |
DIRECT_TYPE_SIZE
Modifier and Type | Method and Description |
---|---|
byte |
cacheObjectType() |
void |
finishUnmarshal(CacheObjectContext ctx,
ClassLoader ldr) |
boolean |
isPlatformType()
Gets flag indicating whether object value is a platform type.
|
CacheObject |
prepareForCache(CacheObjectContext ctx)
Prepares cache object for cache (e.g. copies user-provided object if needed).
|
void |
prepareMarshal(CacheObjectContext ctx) |
boolean |
putValue(ByteBuffer buf) |
boolean |
putValue(ByteBuffer buf,
int off,
int len) |
int |
putValue(long addr) |
<T> T |
value(CacheObjectContext ctx,
boolean cpy) |
byte[] |
valueBytes(CacheObjectContext ctx) |
int |
valueBytesLength(CacheObjectContext ctx) |
directType, fieldsCount, onAckReceived, readFrom, writeTo
static final byte TYPE_REGULAR
static final byte TYPE_BYTE_ARR
static final byte TYPE_BINARY
static final byte TYPE_BINARY_ENUM
@Nullable <T> T value(CacheObjectContext ctx, boolean cpy)
ctx
- Context.cpy
- If true
need to copy value.byte[] valueBytes(CacheObjectContext ctx) throws IgniteCheckedException
ctx
- Context.IgniteCheckedException
- If failed.int valueBytesLength(CacheObjectContext ctx) throws IgniteCheckedException
ctx
- Cache object context.IgniteCheckedException
- If failed.boolean putValue(ByteBuffer buf) throws IgniteCheckedException
buf
- Buffer to write value to.True
if value was successfully written, false
if there was not enough space in the
buffer.IgniteCheckedException
- If failed.int putValue(long addr) throws IgniteCheckedException
addr
- Address tp write value to.IgniteCheckedException
- If failed.boolean putValue(ByteBuffer buf, int off, int len) throws IgniteCheckedException
buf
- 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.byte cacheObjectType()
boolean isPlatformType()
IgniteCache.withKeepBinary()
is used or not.CacheObject prepareForCache(CacheObjectContext ctx)
ctx
- Cache context.void finishUnmarshal(CacheObjectContext ctx, ClassLoader ldr) throws IgniteCheckedException
ctx
- Context.ldr
- Class loader.IgniteCheckedException
- If failed.void prepareMarshal(CacheObjectContext ctx) throws IgniteCheckedException
ctx
- Context.IgniteCheckedException
- If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017