org.apache.ignite.internal.processors.igfs

## Class IgfsBlockKey

- java.lang.Object
- - org.apache.ignite.internal.processors.igfs.IgfsBlockKey

All Implemented Interfaces:
  Externalizable, Serializable, Comparable<IgfsBlockKey>, Binarylizable, Message

    @GridInternal
    public final class IgfsBlockKey
    extends Object
    implements Message, Externalizable, Binarylizable, Comparable<IgfsBlockKey>

File's binary data block key.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`IgfsBlockKey()` Empty constructor required for `Externalizable`.
`IgfsBlockKey(IgniteUuid fileId, IgniteUuid affKey, boolean evictExclude, long blockId)` Constructs file's binary data block key.

### Method Summary

Methods
`IgniteUuid` `affinityKey()`
`int` `compareTo(IgfsBlockKey o)`
`byte` `directType()` Gets message type.
`boolean` `equals(Object o)`
`boolean` `evictExclude()`
`byte` `fieldsCount()` Gets fields count.
`long` `getBlockId()`
`IgniteUuid` `getFileId()`
`int` `hashCode()`
`void` `onAckReceived()` Method called when ack message received.
`void` `readBinary(BinaryReader reader)` Reads fields from provided reader.
`void` `readExternal(ObjectInput in)`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`String` `toString()`
`void` `writeBinary(BinaryWriter writer)` Writes fields to provided writer.
`void` `writeExternal(ObjectOutput out)`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### IgfsBlockKey

    public IgfsBlockKey(IgniteUuid fileId,
                @Nullable
                IgniteUuid affKey,
                boolean evictExclude,
                long blockId)

Constructs file's binary data block key.

Parameters:
  `fileId` - File ID.
  `affKey` - Affinity key.
  `evictExclude` - Evict exclude flag.
  `blockId` - Block ID.

#### IgfsBlockKey

    public IgfsBlockKey()

Empty constructor required for `Externalizable`.

### Method Detail

#### getFileId

    public IgniteUuid getFileId()

Returns:
  File ID.

#### affinityKey

    public IgniteUuid affinityKey()

Returns:
  Block affinity key.

#### evictExclude

    public boolean evictExclude()

Returns:
  Evict exclude flag.

#### getBlockId

    public long getBlockId()

Returns:
  Block ID.

#### onAckReceived

    public void onAckReceived()

Method called when ack message received.

Specified by:
  `onAckReceived` in interface `Message`

#### compareTo

    public int compareTo(@NotNull
                IgfsBlockKey o)

Specified by:
  `compareTo` in interface `Comparable<IgfsBlockKey>`

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

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

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException

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

#### writeBinary

    public void writeBinary(BinaryWriter writer)
                     throws BinaryObjectException

Writes fields to provided writer.

Specified by:
  `writeBinary` in interface `Binarylizable`
Parameters:
  `writer` - Binary object writer.
Throws:
  `BinaryObjectException` - In case of error.

#### readBinary

    public void readBinary(BinaryReader reader)
                    throws BinaryObjectException

Reads fields from provided reader.

Specified by:
  `readBinary` in interface `Binarylizable`
Parameters:
  `reader` - Binary object reader.
Throws:
  `BinaryObjectException` - In case of error.

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### readFrom

    public boolean readFrom(ByteBuffer buf,
                   MessageReader reader)

Reads this message from provided byte buffer.

Specified by:
  `readFrom` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### directType

    public byte directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

Specified by:
  `fieldsCount` in interface `Message`
Returns:
  Fields count.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.8.0
Release Date | : December 5 2016