public class PortableObjectOffheapImpl extends PortableObjectEx implements Externalizable, CacheObject
TYPE_BYTE_ARR, TYPE_REGULAR| Constructor and Description |
|---|
PortableObjectOffheapImpl()
For
Externalizable (not supported). |
PortableObjectOffheapImpl(PortableContext ctx,
long ptr,
int start,
int size) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array() |
PortableObject |
clone()
Copies this portable object.
|
<T> T |
deserialize()
Gets fully deserialized instance of portable object.
|
byte |
directType()
Gets message type.
|
protected <F> F |
field(org.apache.ignite.internal.portable.PortableReaderContext rCtx,
String fieldName) |
<F> F |
field(String fieldName)
Gets field value.
|
byte |
fieldsCount()
Gets fields count.
|
void |
finishUnmarshal(CacheObjectContext ctx,
ClassLoader ldr) |
protected boolean |
hasArray() |
boolean |
hasField(String fieldName)
Checks whether field is set.
|
int |
hashCode() |
PortableObject |
heapCopy() |
int |
length() |
PortableMetadata |
metaData()
Gets meta data for this portable object.
|
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.
|
int |
start() |
byte |
type() |
int |
typeId()
Gets portable object type ID.
|
<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.
|
equals, toStringpublic PortableObjectOffheapImpl()
Externalizable (not supported).public PortableObjectOffheapImpl(PortableContext ctx, long ptr, int start, int size)
ctx - Context.ptr - Memory address.start - Object start.size - Memory size.public PortableObject heapCopy()
public int typeId()
typeId in interface PortableObjectpublic int length()
length in class PortableObjectExpublic int start()
start in class PortableObjectExpublic byte[] array()
array in class PortableObjectExnull.public long offheapAddress()
offheapAddress in class PortableObjectExprotected boolean hasArray()
hasArray in class PortableObjectExTrue if object is array based.@Nullable public PortableMetadata metaData() throws PortableException
metaData in interface PortableObjectPortableException - In case of error.@Nullable public <F> F field(String fieldName) throws PortableException
field in interface PortableObjectfieldName - Field name.PortableException - In case of any other error.@Nullable protected <F> F field(org.apache.ignite.internal.portable.PortableReaderContext rCtx, String fieldName)
field in class PortableObjectExrCtx - Reader context.fieldName - Field name.public boolean hasField(String fieldName)
hasField in interface PortableObjectfieldName - Field name.true if field is set.@Nullable public <T> T deserialize() throws PortableException
deserialize in interface PortableObjectPortableInvalidClassException - If class doesn't exist.PortableException - In case of any other error.public PortableObject clone() throws CloneNotSupportedException
clone in interface PortableObjectclone in class PortableObjectExCloneNotSupportedExceptionpublic byte type()
type 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.4.0 Release Date : September 24 2015