org.apache.ignite.internal.processors.igfs

## Class IgfsBlocksMessage

- java.lang.Object
- - org.apache.ignite.internal.processors.igfs.IgfsCommunicationMessage
  - - org.apache.ignite.internal.processors.igfs.IgfsBlocksMessage

All Implemented Interfaces:
  Serializable, Message

    public class IgfsBlocksMessage
    extends IgfsCommunicationMessage

IGFS write blocks message.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`IgfsBlocksMessage()` Empty constructor required by `Externalizable`
`IgfsBlocksMessage(IgniteUuid fileId, long id, Map<IgfsBlockKey,byte[]> blocks)` Constructor.

### Method Summary

Methods
`Map<IgfsBlockKey,byte[]>` `blocks()`
`byte` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`IgniteUuid` `fileId()`
`long` `id()`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### Methods inherited from class org.apache.ignite.internal.processors.igfs.IgfsCommunicationMessage

`finishUnmarshal, prepareMarshal`

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

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

### Constructor Detail

#### IgfsBlocksMessage

    public IgfsBlocksMessage()

Empty constructor required by `Externalizable`

#### IgfsBlocksMessage

    public IgfsBlocksMessage(IgniteUuid fileId,
                     long id,
                     Map<IgfsBlockKey,byte[]> blocks)

Constructor.

Parameters:
  `fileId` - File ID.
  `id` - Message id.
  `blocks` - Blocks to put in cache.

### Method Detail

#### fileId

    public IgniteUuid fileId()

Returns:
  File id.

#### id

    public long id()

Returns:
  Batch id.

#### blocks

    public Map<IgfsBlockKey,byte[]> blocks()

Returns:
  Map of blocks to put in cache.

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Overrides:
  `writeTo` in class `IgfsCommunicationMessage`
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`
Overrides:
  `readFrom` in class `IgfsCommunicationMessage`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### directType

    public byte directType()

Gets message type.

Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

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

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015