org.apache.ignite.internal.sql.optimizer.affinity

## Class PartitionGroupNode

- java.lang.Object
- - org.apache.ignite.internal.sql.optimizer.affinity.PartitionGroupNode

All Implemented Interfaces:
  PartitionNode

    public class PartitionGroupNode
    extends Object
    implements PartitionNode

Flat group of partitions.

### Constructor Summary

Constructors
Constructor and Description
`PartitionGroupNode(Set<PartitionSingleNode> siblings)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`Collection<Integer>` `apply(PartitionClientContext ctx, Object... args)` Get partitions.
`String` `cacheName()`
`boolean` `constantsOnly()`
`boolean` `contains(PartitionSingleNode val)` Check if value exists.
`boolean` `containsExact(Collection<PartitionSingleNode> siblings)` Check if current group node contains exactly the same set of siblings.
`int` `joinGroup()`
`Set<PartitionSingleNode>` `siblings()`
`String` `toString()`

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

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

### Methods inherited from interface org.apache.ignite.internal.sql.optimizer.affinity.PartitionNode

`optimize`

### Constructor Detail

#### PartitionGroupNode

    public PartitionGroupNode(Set<PartitionSingleNode> siblings)

Constructor.

Parameters:
  `siblings` - Partitions.

### Method Detail

#### apply

    public Collection<Integer> apply(PartitionClientContext ctx,
                                     Object... args)
                              throws IgniteCheckedException

Get partitions.

Specified by:
  `apply` in interface `PartitionNode`
Parameters:
  `ctx` - Thin client context (optional).
  `args` - Query arguments.
Returns:
  Partitions.
Throws:
  `IgniteCheckedException` - If failed.

#### joinGroup

    public int joinGroup()

Specified by:
  `joinGroup` in interface `PartitionNode`
Returns:
  Join group for the given node.

#### siblings

    public Set<PartitionSingleNode> siblings()

Returns:
  Siblings

#### contains

    public boolean contains(PartitionSingleNode val)

Check if value exists. Should be called only on non-mixed node.

Parameters:
  `val` - Value
Returns:
  `True` if exists.

#### containsExact

    public boolean containsExact(Collection<PartitionSingleNode> siblings)

Check if current group node contains exactly the same set of siblings.

Parameters:
  `siblings` - Siblings to check.
Returns:
  `True` if both sets of siblings contain the same elements.

#### constantsOnly

    public boolean constantsOnly()

Returns:
  `True` if the group contain only constants.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### cacheName

    public String cacheName()

Specified by:
  `cacheName` in interface `PartitionNode`
Returns:
  First met cache name of an any `PartitionSingleNode` during `PartitionNode` tree traversal. This method is intended to be used within the Jdbc thin client.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020