public class BinaryObjectOffheapImpl extends BinaryObjectExImpl implements Externalizable, CacheObject
TYPE_BINARY, TYPE_BYTE_ARR, TYPE_REGULAR| Constructor and Description |
|---|
BinaryObjectOffheapImpl()
For
Externalizable (not supported). |
BinaryObjectOffheapImpl(PortableContext ctx,
long ptr,
int start,
int size) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array() |
byte |
cacheObjectType() |
BinaryObject |
clone()
Copies this binary object.
|
protected PortableSchema |
createSchema()
Create schema for object.
|
<T> T |
deserialize()
Gets fully deserialized instance of binary object.
|
byte |
directType()
Gets message type.
|
protected <F> F |
field(BinaryReaderHandles rCtx,
String fieldName) |
<F> F |
field(int fieldId)
Gets field value.
|
<F> F |
field(String fieldName)
Gets field value.
|
protected <F> F |
fieldByOrder(int order)
Get field by offset.
|
byte |
fieldsCount()
Gets fields count.
|
void |
finishUnmarshal(CacheObjectContext ctx,
ClassLoader ldr) |
protected boolean |
hasArray() |
boolean |
hasField(String fieldName)
Checks whether field exists in the object.
|
int |
hashCode() |
BinaryObject |
heapCopy() |
boolean |
isPlatformType()
Gets flag indicating whether object value is a platform type.
|
int |
length() |
long |
offheapAddress() |
CacheObject |
prepareForCache(CacheObjectContext ctx)
Prepares cache object for cache (e.g. copies user-provided object if needed).
|
void |
prepareMarshal(CacheObjectContext ctx) |
void |
readExternal(ObjectInput in) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
protected int |
schemaId()
Get schema ID.
|
int |
start() |
BinaryType |
type()
Gets type information for this binary object.
|
int |
typeId() |
<T> T |
value(CacheObjectContext ctx,
boolean cpy) |
byte[] |
valueBytes(CacheObjectContext ctx) |
void |
writeExternal(ObjectOutput out) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
enumOrdinal, equals, toStringpublic BinaryObjectOffheapImpl()
Externalizable (not supported).public BinaryObjectOffheapImpl(PortableContext ctx, long ptr, int start, int size)
ctx - Context.ptr - Memory address.start - Object start.size - Memory size.public BinaryObject heapCopy()
public int typeId()
typeId in interface BinaryObjectExpublic int length()
length in class BinaryObjectExImplprotected int schemaId()
schemaId in class BinaryObjectExImplprotected PortableSchema createSchema()
createSchema in class BinaryObjectExImplpublic int start()
start in class BinaryObjectExImplpublic byte[] array()
array in class BinaryObjectExImplnull.public long offheapAddress()
offheapAddress in class BinaryObjectExImplprotected boolean hasArray()
hasArray in class BinaryObjectExImplTrue if object is array based.@Nullable public BinaryType type() throws BinaryObjectException
type in interface BinaryObjectBinaryObjectException - In case of error.@Nullable public <F> F field(String fieldName) throws BinaryObjectException
field in interface BinaryObjectfieldName - Field name.BinaryObjectException - In case of any other error.@Nullable public <F> F field(int fieldId) throws BinaryObjectException
field in class BinaryObjectExImplfieldId - Field ID.BinaryObjectException - In case of any other error.@Nullable protected <F> F fieldByOrder(int order)
fieldByOrder in class BinaryObjectExImplorder - Field offset.@Nullable protected <F> F field(BinaryReaderHandles rCtx, String fieldName)
field in class BinaryObjectExImplrCtx - Reader context.fieldName - Field name.public boolean hasField(String fieldName)
hasField in interface BinaryObjectfieldName - Field name.True if field exists.@Nullable public <T> T deserialize() throws BinaryObjectException
deserialize in interface BinaryObjectBinaryInvalidTypeException - If class doesn't exist.BinaryObjectException - In case of any other error.public BinaryObject clone() throws CloneNotSupportedException
clone in interface BinaryObjectclone in class BinaryObjectExImplCloneNotSupportedExceptionpublic byte cacheObjectType()
cacheObjectType in interface CacheObjectpublic boolean isPlatformType()
IgniteCache.withKeepBinary() is used or not.isPlatformType in interface CacheObject@Nullable public <T> T value(CacheObjectContext ctx, boolean cpy)
value in interface CacheObjectctx - Context.cpy - If true need to copy value.public byte[] valueBytes(CacheObjectContext ctx) throws IgniteCheckedException
valueBytes in interface CacheObjectctx - Context.IgniteCheckedException - If failed.public CacheObject prepareForCache(CacheObjectContext ctx)
prepareForCache in interface CacheObjectctx - Cache context.public void finishUnmarshal(CacheObjectContext ctx, ClassLoader ldr) throws IgniteCheckedException
finishUnmarshal in interface CacheObjectctx - Context.ldr - Class loader.IgniteCheckedException - If failed.public void prepareMarshal(CacheObjectContext ctx) throws IgniteCheckedException
prepareMarshal in interface CacheObjectctx - Context.IgniteCheckedException - If failed.public boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
public byte directType()
directType in interface Messagepublic byte fieldsCount()
fieldsCount in interface Messagepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.0-b1 Release Date : December 1 2015