org.apache.ignite.internal.dto

## Class IgniteDataTransferObject

- java.lang.Object
- - org.apache.ignite.internal.dto.IgniteDataTransferObject

All Implemented Interfaces:
  Externalizable, Serializable

    public abstract class IgniteDataTransferObject
    extends Object
    implements Externalizable

Base class for data transfer objects.

See Also:
  Serialized Form

### Field Summary

Fields
`protected static byte` `V1` Version 1.
`protected static byte` `V2` Version 2.
`protected static byte` `V3` Version 3.
`protected static byte` `V4` Version 4.
`protected static byte` `V5` Version 5.

### Constructor Summary

Constructors
Constructor and Description
`IgniteDataTransferObject()`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`byte` `getProtocolVersion()`
`void` `readExternal(ObjectInput in)`
`protected abstract void` `readExternalData(byte protoVer, ObjectInput in)` Load object's specific data content.
`protected static <T> List<T>` `toList(Collection<T> col)`
`protected static <T> Set<T>` `toSet(Collection<T> col)`
`void` `writeExternal(ObjectOutput out)`
`protected abstract void` `writeExternalData(ObjectOutput out)` Save object's specific data content.

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

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

### Field Detail

#### V1

    protected static final byte V1

Version 1.

See Also:
  Constant Field Values

#### V2

    protected static final byte V2

Version 2.

See Also:
  Constant Field Values

#### V3

    protected static final byte V3

Version 3.

See Also:
  Constant Field Values

#### V4

    protected static final byte V4

Version 4.

See Also:
  Constant Field Values

#### V5

    protected static final byte V5

Version 5.

See Also:
  Constant Field Values

### Constructor Detail

#### IgniteDataTransferObject

    public IgniteDataTransferObject()

### Method Detail

#### toList

    @Nullable
    protected static <T> List<T> toList(Collection<T> col)

Type Parameters:
  `T` - Collection type.
Parameters:
  `col` - Source collection.
Returns:
  List based on passed collection.

#### toSet

    @Nullable
    protected static <T> Set<T> toSet(Collection<T> col)

Type Parameters:
  `T` - Collection type.
Parameters:
  `col` - Source collection.
Returns:
  List based on passed collection.

#### getProtocolVersion

    public byte getProtocolVersion()

Returns:
  Transfer object version.

#### writeExternalData

    protected abstract void writeExternalData(ObjectOutput out)
                                       throws IOException

Save object's specific data content.

Parameters:
  `out` - Output object to write data content.
Throws:
  `IOException` - If I/O errors occur.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternalData

    protected abstract void readExternalData(byte protoVer,
                                             ObjectInput in)
                                      throws IOException,
                                             ClassNotFoundException

Load object's specific data content.

Parameters:
  `protoVer` - Input object version.
  `in` - Input object to load data content.
Throws:
  `IOException` - If I/O errors occur.
  `ClassNotFoundException` - If the class for an object being restored cannot be found.

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.0
Release Date | : November 30 2018