public class BinaryFieldImpl extends Object implements BinaryFieldEx
| Constructor and Description |
|---|
BinaryFieldImpl(BinaryContext ctx,
int typeId,
BinarySchemaRegistry schemas,
String fieldName,
int fieldId)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(BinaryObject obj)
Check whether field exists in the object.
|
int |
fieldId() |
int |
fieldOrder(BinaryObjectExImpl obj)
Get relative field offset.
|
String |
name()
Get field's name.
|
<F> F |
readField(ByteBuffer buf)
Reads field value from the given byte buffer.
|
String |
toString() |
int |
typeId() |
<T> T |
value(BinaryObject obj)
Get field's value from the given object.
|
boolean |
writeField(BinaryObject obj,
ByteBuffer buf)
Writes field value to the given byte buffer.
|
public BinaryFieldImpl(BinaryContext ctx, int typeId, BinarySchemaRegistry schemas, String fieldName, int fieldId)
ctx - Binary context.typeId - Type ID.schemas - Schemas.fieldName - Field name.fieldId - Field ID.public String name()
name in interface BinaryFieldpublic int fieldId()
public boolean exists(BinaryObject obj)
exists in interface BinaryFieldobj - Object.True if exists.public <T> T value(BinaryObject obj)
value in interface BinaryFieldobj - Object.public int typeId()
typeId in interface BinaryFieldExpublic boolean writeField(BinaryObject obj, ByteBuffer buf)
writeField in interface BinaryFieldExobj - Object from which the field should be extracted.buf - Buffer to write the field value to.True if the value was successfully written, false if there is not enough space
for the field in the buffer.public <F> F readField(ByteBuffer buf)
readField in interface BinaryFieldExbuf - Buffer to read value from.public int fieldOrder(BinaryObjectExImpl obj)
obj - Object.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021