public class BinaryEnumObjectImpl extends Object implements BinaryObjectEx, Externalizable, CacheObject
TYPE_BINARY, TYPE_BYTE_ARR, TYPE_REGULAR| Constructor and Description |
|---|
BinaryEnumObjectImpl()
Externalizable support. |
BinaryEnumObjectImpl(PortableContext ctx,
int typeId,
String clsName,
int ord)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
cacheObjectType() |
String |
className() |
BinaryObject |
clone()
Copies this binary object.
|
<T> T |
deserialize()
Gets fully deserialized instance of binary object.
|
byte |
directType()
Gets message type.
|
int |
enumOrdinal()
Get ordinal for this enum object.
|
boolean |
equals(Object obj) |
<F> F |
field(String fieldName)
Gets field value.
|
byte |
fieldsCount()
Gets fields count.
|
void |
finishUnmarshal(CacheObjectContext ctx,
ClassLoader ldr) |
boolean |
hasField(String fieldName)
Checks whether field exists in the object.
|
int |
hashCode() |
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) |
void |
readExternal(ObjectInput in) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
String |
toString() |
BinaryType |
type()
Gets type information for this binary object.
|
int |
typeId() |
<T> T |
value(CacheObjectContext ctx,
boolean cpy) |
byte[] |
valueBytes(CacheObjectContext cacheCtx) |
void |
writeExternal(ObjectOutput out) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
public BinaryEnumObjectImpl()
Externalizable support.public BinaryEnumObjectImpl(PortableContext ctx, int typeId, @Nullable String clsName, int ord)
ctx - Context.typeId - Type ID.clsName - Class name.ord - Ordinal.public int typeId()
typeId in interface BinaryObjectExpublic BinaryType type() throws BinaryObjectException
type in interface BinaryObjectBinaryObjectException - In case of error.public <F> F field(String fieldName) throws BinaryObjectException
field in interface BinaryObjectfieldName - Field name.BinaryObjectException - In case of any other error.public boolean hasField(String fieldName)
hasField in interface BinaryObjectfieldName - Field name.True if field exists.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 ObjectCloneNotSupportedExceptionpublic int enumOrdinal()
throws BinaryObjectException
BinaryType.isEnum() to check if object is of enum type.enumOrdinal in interface BinaryObjectBinaryObjectException - If object is not enum.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundException@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 cacheCtx) throws IgniteCheckedException
valueBytes in interface CacheObjectcacheCtx - Context.IgniteCheckedException - If failed.public byte cacheObjectType()
cacheObjectType in interface CacheObjectpublic boolean isPlatformType()
IgniteCache.withKeepBinary() is used or not.isPlatformType in interface CacheObjectpublic 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 byte directType()
directType in interface Messagepublic byte fieldsCount()
fieldsCount in interface Messagepublic boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.0-b1 Release Date : December 1 2015