org.apache.ignite.dump

## Interface DumpConsumer

-     public interface DumpConsumer

  Consumer of `Dump`. This consumer will receive all `DumpEntry` stored in cache dump during `IgniteDumpReader` application invocation. The lifecycle of the consumer is the following:
  - Start of the consumer `start()`.
  - Stop of the consumer `stop()`.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onCacheConfigs(Iterator<org.apache.ignite.internal.processors.cache.StoredCacheData> caches)` Handles cache configs.
    `void` | `onMappings(Iterator<TypeMapping> mappings)` Handles type mappings.
    `void` | `onPartition(int grp, int part, Iterator<DumpEntry> data)` Handles cache data.
    `void` | `onTypes(Iterator<BinaryType> types)` Handles binary types.
    `void` | `start()` Starts the consumer.
    `void` | `stop()` Stops the consumer.

- - ### Method Detail

    - #### start

          void start()

      Starts the consumer.

    - #### onMappings

          void onMappings(Iterator<TypeMapping> mappings)

      Handles type mappings.
      Parameters:
        `mappings` - Mappings iterator.

    - #### onTypes

          void onTypes(Iterator<BinaryType> types)

      Handles binary types.
      Parameters:
        `types` - Binary types iterator.

    - #### onCacheConfigs

          void onCacheConfigs(Iterator<org.apache.ignite.internal.processors.cache.StoredCacheData> caches)

      Handles cache configs. Note, there can be several copies of cache config in the dump. This can happen if dump contains data from several nodes.
      Parameters:
        `caches` - Stored cache data.

    - #### onPartition

          void onPartition(int grp,
                           int part,
                           Iterator<DumpEntry> data)

      Handles cache data. This method can be invoced by several threads concurrently. Note, there can be several copies of group partition in the dump. This can happen if dump contains data from several nodes. In this case callback will be invoked several time for the same pair of [grp, part] values.
      Parameters:
        `grp` - Group id.
        `part` - Partition.
        `data` - Cache data iterator.
      See Also:
        `DumpReaderConfiguration.threadCount()`

    - #### stop

          void stop()

      Stops the consumer. This method can be invoked only after `start()`.

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023