org.apache.ignite.internal.binary

## Class BinaryFieldAccessor

- java.lang.Object
- - org.apache.ignite.internal.binary.BinaryFieldAccessor

    public abstract class BinaryFieldAccessor
    extends Object

Field accessor to speedup access.

### Field Summary

Fields
`protected int` `id` Field ID.
`protected BinaryWriteMode` `mode` Mode.
`protected String` `name` Field name

### Constructor Summary

Constructors
`protected` `BinaryFieldAccessor(Field field, int id, BinaryWriteMode mode)` Protected constructor.

### Method Summary

Methods
`static BinaryFieldAccessor` `create(Field field, int id)` Create accessor for the field.
`BinaryWriteMode` `mode()` Get mode.
`void` `read(Object obj, BinaryReaderExImpl reader)` Read field.
`protected abstract void` `read0(Object obj, BinaryReaderExImpl reader)` Read field.
`abstract void` `write(Object obj, BinaryWriterExImpl writer)` Write field.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### id

    protected final int id

Field ID.

#### name

    protected final String name

Field name

#### mode

    protected final BinaryWriteMode mode

Mode.

### Constructor Detail

#### BinaryFieldAccessor

    protected BinaryFieldAccessor(Field field,
                       int id,
                       BinaryWriteMode mode)

Protected constructor.

Parameters:
  `id` - Field ID.
  `mode` - Mode;

### Method Detail

#### create

    public static BinaryFieldAccessor create(Field field,
                             int id)

Create accessor for the field.

Parameters:
  `field` - Field.
  `id` - FIeld ID.
Returns:
  Accessor.

#### mode

    public BinaryWriteMode mode()

Get mode.

Returns:
  Mode.

#### write

    public abstract void write(Object obj,
             BinaryWriterExImpl writer)
                        throws BinaryObjectException

Write field.

Parameters:
  `obj` - Object.
  `writer` - Writer.
Throws:
  `BinaryObjectException` - If failed.

#### read

    public void read(Object obj,
            BinaryReaderExImpl reader)
              throws BinaryObjectException

Read field.

Parameters:
  `obj` - Object.
  `reader` - Reader.
Throws:
  `BinaryObjectException` - If failed.

#### read0

    protected abstract void read0(Object obj,
             BinaryReaderExImpl reader)
                           throws BinaryObjectException

Read field.

Parameters:
  `obj` - Object.
  `reader` - Reader.
Throws:
  `BinaryObjectException` - If failed.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.2.0
Release Date | : September 15 2017