public final class PortableObjectImpl extends PortableObjectEx implements Externalizable, Message, CacheObject, KeyCacheObject
| Modifier and Type | Field and Description |
|---|---|
static byte |
TYPE_PORTABLE |
TYPE_BYTE_ARR, TYPE_REGULAR| Constructor and Description |
|---|
PortableObjectImpl()
For
Externalizable. |
PortableObjectImpl(PortableContext ctx,
byte[] arr,
int start) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array() |
PortableObject |
clone()
Copies this portable object.
|
PortableContext |
context() |
void |
context(PortableContext ctx) |
<T> T |
deserialize()
Gets fully deserialized instance of portable object.
|
PortableObject |
detach() |
boolean |
detachAllowed() |
void |
detachAllowed(boolean detachAllowed) |
boolean |
detached() |
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() |
boolean |
internal() |
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 static final byte TYPE_PORTABLE
public PortableObjectImpl()
Externalizable.public PortableObjectImpl(PortableContext ctx, byte[] arr, int start)
ctx - Context.arr - Array.start - Start.public byte type()
type in interface CacheObjectpublic boolean internal()
internal in interface KeyCacheObjectTrue if internal cache key.@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 int length()
length in class PortableObjectExpublic PortableObject detach()
public boolean detached()
public boolean detachAllowed()
True if detach is allowed.public void detachAllowed(boolean detachAllowed)
detachAllowed - Detach allowed flag.public PortableContext context()
public void context(PortableContext ctx)
ctx - Context.public byte[] array()
array in class PortableObjectExnull.public int start()
start in class PortableObjectExpublic long offheapAddress()
offheapAddress in class PortableObjectExprotected boolean hasArray()
hasArray in class PortableObjectExTrue if object is array based.public int typeId()
typeId in interface PortableObject@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 int hashCode()
hashCode in interface KeyCacheObjecthashCode in class Objectpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic 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 Message
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015