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

## Interface IgniteStatisticsStore

All Known Implementing Classes:
  IgniteStatisticsDummyStoreImpl, IgniteStatisticsInMemoryStoreImpl, IgniteStatisticsPersistenceStoreImpl

    public interface IgniteStatisticsStore

Statistics store interface. Wrap physical storage (in memory or local metastore) to give easy access to statistics.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `clearAllStatistics()` Clear statistics of any type for any objects;
`void` `clearLocalPartitionsStatistics(StatisticsKey key)` Clear partition statistics for specified object.
`void` `clearLocalPartitionsStatistics(StatisticsKey key, Collection<Integer> partIds)` Clear partitions statistics.
`void` `clearLocalPartitionStatistics(StatisticsKey key, int partId)` Clear partition statistics.
`void` `clearObsolescenceInfo(StatisticsKey key, Collection<Integer> partIds)` Remove obsolescence info for the given key and partitions (if specified).
`Map<StatisticsKey,Collection<ObjectPartitionStatisticsImpl>>` `getAllLocalPartitionsStatistics(String schema)` Get all local partition statistics.
`Collection<ObjectPartitionStatisticsImpl>` `getLocalPartitionsStatistics(StatisticsKey key)` Get local partition statistics by specified object.
`ObjectPartitionStatisticsImpl` `getLocalPartitionStatistics(StatisticsKey key, int partId)` Get partition statistics.
`Map<StatisticsKey,IntMap<ObjectPartitionStatisticsObsolescence>>` `loadAllObsolescence()` Load all obsolescence info from store.
`Collection<Integer>` `loadLocalPartitionMap(StatisticsKey key)` Load partitions map by key.
`void` `replaceLocalPartitionsStatistics(StatisticsKey key, Collection<ObjectPartitionStatisticsImpl> statistics)` Replace all tables partition statistics with specified ones.
`void` `saveLocalPartitionStatistics(StatisticsKey key, ObjectPartitionStatisticsImpl statistics)` Save partition statistics.
`void` `saveObsolescenceInfo(Map<StatisticsKey,IntMap<ObjectPartitionStatisticsObsolescence>> obsolescence)`
`void` `saveObsolescenceInfo(StatisticsKey key, int partId, ObjectPartitionStatisticsObsolescence partObs)` Save obsolescence info.

### Method Detail

#### clearAllStatistics

    void clearAllStatistics()

Clear statistics of any type for any objects;

#### getAllLocalPartitionsStatistics

    Map<StatisticsKey,Collection<ObjectPartitionStatisticsImpl>> getAllLocalPartitionsStatistics(String schema)

Get all local partition statistics.

Parameters:
  `schema` - Schema name, if `null` - returl local partitions statistics for all schemas.
Returns:
  Map with all local partitions statistics.

#### replaceLocalPartitionsStatistics

    void replaceLocalPartitionsStatistics(StatisticsKey key,
                                          Collection<ObjectPartitionStatisticsImpl> statistics)

Replace all tables partition statistics with specified ones.

Parameters:
  `key` - Statistics key to replace statistics by.
  `statistics` - Collection of partition level statistics.

#### getLocalPartitionsStatistics

    Collection<ObjectPartitionStatisticsImpl> getLocalPartitionsStatistics(StatisticsKey key)

Get local partition statistics by specified object.

Parameters:
  `key` - Key to get statistics by.
Returns:
  Collection of partitions statistics.

#### clearLocalPartitionsStatistics

    void clearLocalPartitionsStatistics(StatisticsKey key)

Clear partition statistics for specified object.

Parameters:
  `key` - Key to clear statistics by.

#### getLocalPartitionStatistics

    ObjectPartitionStatisticsImpl getLocalPartitionStatistics(StatisticsKey key,
                                                              int partId)

Get partition statistics.

Parameters:
  `key` - Key to get partition statistics by.
  `partId` - Partition id.
Returns:
  Object partition statistics or `null` if there are no statistics collected for such partition.

#### clearLocalPartitionStatistics

    void clearLocalPartitionStatistics(StatisticsKey key,
                                       int partId)

Clear partition statistics.

Parameters:
  `key` - Object which statistics needs to be cleaned.
  `partId` - Partition id.

#### clearLocalPartitionsStatistics

    void clearLocalPartitionsStatistics(StatisticsKey key,
                                        Collection<Integer> partIds)

Clear partitions statistics.

Parameters:
  `key` - Object which statistics need to be cleaned.
  `partIds` - Collection of partition ids.

#### saveLocalPartitionStatistics

    void saveLocalPartitionStatistics(StatisticsKey key,
                                      ObjectPartitionStatisticsImpl statistics)

Save partition statistics.

Parameters:
  `key` - Object which partition statistics belongs to.
  `statistics` - Statistics to save.

#### saveObsolescenceInfo

    void saveObsolescenceInfo(Map<StatisticsKey,IntMap<ObjectPartitionStatisticsObsolescence>> obsolescence)

Parameters:
  `obsolescence` - Statistics key to partId to obsolescence info map to save.

#### saveObsolescenceInfo

    void saveObsolescenceInfo(StatisticsKey key,
                              int partId,
                              ObjectPartitionStatisticsObsolescence partObs)

Save obsolescence info.

Parameters:
  `key` - Statistics key which it is belongs to.
  `partId` - Partition id.
  `partObs` - Info to save.

#### clearObsolescenceInfo

    void clearObsolescenceInfo(StatisticsKey key,
                               Collection<Integer> partIds)

Remove obsolescence info for the given key and partitions (if specified).

Parameters:
  `key` - Statistics key to remove obsolescense info by.
  `partIds` - Partition ids, if `null` - remove all partitions info for specified key.

#### loadAllObsolescence

    Map<StatisticsKey,IntMap<ObjectPartitionStatisticsObsolescence>> loadAllObsolescence()

Load all obsolescence info from store.

Returns:
  StatisticsKey to partitionId to obsolescence info map.

#### loadLocalPartitionMap

    Collection<Integer> loadLocalPartitionMap(StatisticsKey key)

Load partitions map by key.

Parameters:
  `key` - Staistics key to load map by.
Returns:
  Collection of all partition ids for which there are local partitions statistics.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023