Package org.apache.ignite.internal.processors.query.stat.task

## Class GatherPartitionStatistics

- java.lang.Object
- - org.apache.ignite.internal.processors.query.stat.task.GatherPartitionStatistics

All Implemented Interfaces:
  `Callable<ObjectPartitionStatisticsImpl>`

    public class GatherPartitionStatistics
    extends Object
    implements Callable<ObjectPartitionStatisticsImpl>

Implementation of statistic collector. Load existing, gather or remove some columns statistics and save it back to repository. In case of context.force - recollect all columns. In case of context.configuration contains less columns than existing statistics - remove some columns. In case of existing statistics contains column with required version - leave it as is. Reset obsolescence if needed.

### Constructor Summary

Constructors
`GatherPartitionStatistics​(IgniteStatisticsRepository statRepo, LocalStatisticsGatheringContext gathCtx, int partId, IgniteLogger log)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`ObjectPartitionStatisticsImpl` `call()` Reuse or gather new partition statistics according to context and repository state.
`LocalStatisticsGatheringContext` `context()`
`int` `partition()`

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

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

### Constructor Detail

#### GatherPartitionStatistics

    public GatherPartitionStatistics​(IgniteStatisticsRepository statRepo,
                                     LocalStatisticsGatheringContext gathCtx,
                                     int partId,
                                     IgniteLogger log)

Constructor.

Parameters:
  `statRepo` - Statistics repository.
  `gathCtx` - Gathering context.
  `partId` - Target partition id in context.
  `log` - Logger.

### Method Detail

#### partition

    public int partition()

Returns:
  Partition id.

#### context

    public LocalStatisticsGatheringContext context()

Returns:
  LocalStatisticsGatheringContext.

#### call

    public ObjectPartitionStatisticsImpl call()

Reuse or gather new partition statistics according to context and repository state. Save partition statistcs and obsolescence info back to repository if needed.

Specified by:
  `call` in interface `Callable<ObjectPartitionStatisticsImpl>`
Returns:
  Partition statistics.