public class KeyCacheObjectImpl extends CacheObjectAdapter implements KeyCacheObject
val, valBytesTYPE_BINARY, TYPE_BINARY_ENUM, TYPE_BYTE_ARR, TYPE_REGULARDIRECT_TYPE_SIZE| Constructor and Description |
|---|
KeyCacheObjectImpl() |
KeyCacheObjectImpl(Object val,
byte[] valBytes,
int part) |
| Modifier and Type | Method and Description |
|---|---|
KeyCacheObject |
copy(int part) |
short |
directType()
Gets message type.
|
boolean |
equals(Object obj) |
byte |
fieldsCount()
Gets fields count.
|
void |
finishUnmarshal(CacheObjectValueContext ctx,
ClassLoader ldr) |
int |
hashCode() |
boolean |
internal() |
boolean |
isPlatformType()
Gets flag indicating whether object value is a platform type.
|
void |
onAckReceived()
Method called when ack message received.
|
int |
partition() |
void |
partition(int part)
Sets partition ID for this key.
|
CacheObject |
prepareForCache(CacheObjectContext ctx)
Prepares cache object for cache (e.g. copies user-provided object if needed).
|
void |
prepareMarshal(CacheObjectValueContext ctx) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
String |
toString() |
<T> T |
value(CacheObjectValueContext ctx,
boolean cpy) |
byte[] |
valueBytes(CacheObjectValueContext ctx) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
cacheObjectType, needCopy, objectPutSize, putValue, putValue, putValue, putValue, putValue, readExternal, valueBytesLength, writeExternalclone, finalize, getClass, notify, notifyAll, wait, wait, waitcacheObjectType, putValue, putValue, putValue, valueBytesLengthpublic KeyCacheObjectImpl()
public KeyCacheObjectImpl(Object val, byte[] valBytes, int part)
val - Value.valBytes - Value bytes.part - Partition.public KeyCacheObject copy(int part)
copy in interface KeyCacheObjectpart - Partition ID.public int partition()
partition in interface KeyCacheObjectpublic void partition(int part)
partition in interface KeyCacheObjectpart - Partition ID.public byte[] valueBytes(CacheObjectValueContext ctx) throws IgniteCheckedException
valueBytes in interface CacheObjectctx - Context.IgniteCheckedException - If failed.public boolean internal()
internal in interface KeyCacheObjectTrue if internal cache key.public boolean isPlatformType()
IgniteCache.withKeepBinary() is used or not.isPlatformType in interface CacheObject@Nullable public <T> T value(CacheObjectValueContext ctx, boolean cpy)
value in interface CacheObjectctx - Context.cpy - If true need to copy value.public void onAckReceived()
onAckReceived in interface Messagepublic CacheObject prepareForCache(CacheObjectContext ctx)
prepareForCache in interface CacheObjectctx - Cache context.public int hashCode()
hashCode in interface KeyCacheObjecthashCode in class Objectpublic short directType()
directType in interface Messagepublic byte fieldsCount()
fieldsCount in interface MessagefieldsCount in class CacheObjectAdapterpublic boolean readFrom(ByteBuffer buf, MessageReader reader)
readFrom in interface MessagereadFrom in class CacheObjectAdapterbuf - Byte buffer.reader - Reader.public boolean writeTo(ByteBuffer buf, MessageWriter writer)
writeTo in interface MessagewriteTo in class CacheObjectAdapterbuf - Byte buffer.writer - Writer.public void prepareMarshal(CacheObjectValueContext ctx) throws IgniteCheckedException
prepareMarshal in interface CacheObjectctx - Context.IgniteCheckedException - If failed.public void finishUnmarshal(CacheObjectValueContext ctx, ClassLoader ldr) throws IgniteCheckedException
finishUnmarshal in interface CacheObjectctx - Context.ldr - Class loader.IgniteCheckedException - If failed.public String toString()
toString in class CacheObjectAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 2.1.0 Release Date : July 20 2017