public abstract class BinaryObjectExImpl extends Object implements BinaryObjectEx
Constructor and Description |
---|
BinaryObjectExImpl() |
Modifier and Type | Method and Description |
---|---|
abstract byte[] |
array() |
BinaryObject |
clone()
Copies this binary object.
|
abstract BinaryContext |
context()
Get binary context.
|
abstract BinarySerializedFieldComparator |
createFieldComparator()
Create field comparer.
|
abstract BinarySchema |
createSchema()
Create schema for object.
|
abstract int |
dataStartOffset()
Get offset of data begin.
|
int |
enumOrdinal()
Get ordinal for this enum object.
|
boolean |
equals(Object other) |
protected abstract <F> F |
field(BinaryReaderHandles ctx,
String fieldName) |
abstract <F> F |
field(int fieldId)
Gets field value.
|
abstract <F> F |
fieldByOrder(int order)
Get field by offset.
|
abstract int |
footerStartOffset()
Get offset of the footer begin.
|
abstract boolean |
hasArray() |
abstract boolean |
hasSchema() |
abstract int |
length() |
abstract long |
offheapAddress() |
abstract int |
schemaId()
Get schema ID.
|
abstract int |
start() |
BinaryObjectBuilder |
toBuilder()
Creates a new
BinaryObjectBuilder based on this binary object. |
String |
toString() |
protected abstract boolean |
writeFieldByOrder(int fieldOffset,
ByteBuffer buf)
Writes field value defined by the given field offset to the given byte buffer.
|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isFlagSet, rawType, typeId
deserialize, field, hasField, type
public abstract int length()
public abstract int start()
public abstract boolean hasArray()
True
if object is array based.public abstract byte[] array()
null
.public abstract long offheapAddress()
@Nullable public abstract <F> F field(int fieldId) throws BinaryObjectException
fieldId
- Field ID.BinaryObjectException
- In case of any other error.public int enumOrdinal() throws BinaryObjectException
BinaryType.isEnum()
to check if object is of enum type.enumOrdinal
in interface BinaryObject
BinaryObjectException
- If object is not enum.public abstract int dataStartOffset()
public abstract int footerStartOffset()
@Nullable public abstract <F> F fieldByOrder(int order)
order
- Field offset.public abstract BinarySerializedFieldComparator createFieldComparator()
protected abstract boolean writeFieldByOrder(int fieldOffset, ByteBuffer buf)
fieldOffset
- Field offset.false
if there is no enough space for the field in the buffer.@Nullable protected abstract <F> F field(BinaryReaderHandles ctx, String fieldName)
ctx
- Reader context.fieldName
- Field name.public abstract boolean hasSchema()
True
if object has schema.public abstract int schemaId()
public abstract BinarySchema createSchema()
public abstract BinaryContext context()
public BinaryObjectBuilder toBuilder() throws BinaryObjectException
BinaryObjectBuilder
based on this binary object. The following code
BinaryObjectBuilder builder = binaryObject.toBuilder();is equivalent to
BinaryObjectBuilder builder = ignite.binary().builder(binaryObject);
toBuilder
in interface BinaryObject
BinaryObjectException
- If builder cannot be created.public BinaryObject clone() throws CloneNotSupportedException
clone
in interface BinaryObject
clone
in class Object
CloneNotSupportedException
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017