org.apache.ignite.internal.processors.query.h2.twostep.messages

## Class GridQueryRequest

- java.lang.Object
- - org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryRequest

All Implemented Interfaces:
  Serializable, Message

    public class GridQueryRequest
    extends Object
    implements Message

Query request.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`GridQueryRequest()` Default constructor.
`GridQueryRequest(GridQueryRequest cp)`
`GridQueryRequest(long reqId, int pageSize, String space, Collection<GridCacheSqlQuery> qrys, AffinityTopologyVersion topVer, List<String> extraSpaces, int[] parts)`

### Method Summary

Methods
`byte` `directType()` Gets message type.
`List<String>` `extraSpaces()`
`byte` `fieldsCount()` Gets fields count.
`int` `pageSize()`
`int[]` `partitions()`
`void` `partitions(int[] parts)`
`Collection<GridCacheSqlQuery>` `queries()`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`long` `requestId()`
`String` `space()`
`AffinityTopologyVersion` `topologyVersion()`
`String` `toString()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

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

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

### Constructor Detail

#### GridQueryRequest

    public GridQueryRequest()

Default constructor.

#### GridQueryRequest

    public GridQueryRequest(long reqId,
                    int pageSize,
                    String space,
                    Collection<GridCacheSqlQuery> qrys,
                    AffinityTopologyVersion topVer,
                    List<String> extraSpaces,
                    int[] parts)

Parameters:
  `reqId` - Request ID.
  `pageSize` - Page size.
  `space` - Space.
  `qrys` - Queries.
  `topVer` - Topology version.
  `extraSpaces` - All space names participating in query other than `space`.
  `parts` - Optional partitions for unstable topology.

#### GridQueryRequest

    public GridQueryRequest(GridQueryRequest cp)

Parameters:
  `cp` - Copy from.

### Method Detail

#### partitions

    public int[] partitions()

Returns:
  All the needed partitions for `space()` and `extraSpaces()`.

#### partitions

    public void partitions(int[] parts)

Parameters:
  `parts` - All the needed partitions for `space()` and `extraSpaces()`.

#### extraSpaces

    public List<String> extraSpaces()

Returns:
  All extra space names participating in query other than `space()`.

#### topologyVersion

    public AffinityTopologyVersion topologyVersion()

Returns:
  Topology version.

#### requestId

    public long requestId()

Returns:
  Request ID.

#### pageSize

    public int pageSize()

Returns:
  Page size.

#### space

    public String space()

Returns:
  Space.

#### queries

    public Collection<GridCacheSqlQuery> queries()
                                          throws IgniteCheckedException

Returns:
  Queries.
Throws:
  `IgniteCheckedException`

#### toString

    public String toString()

Overrides:
  `toString` 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.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.4.0
Release Date | : September 24 2015