Package org.apache.ignite.dump

## Class JsonDumpConsumer

- java.lang.Object
- - org.apache.ignite.dump.JsonDumpConsumer

- All Implemented Interfaces:
    `DumpConsumer`, `org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.DumpConsumerKernalContextAware`

      public class JsonDumpConsumer
      extends Object
      implements org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.DumpConsumerKernalContextAware

  Dump consumer that outputs entries in json format.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `JsonDumpConsumer()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | 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` | `start​(org.apache.ignite.internal.GridKernalContext ctx)` | Starts the consumer with the kernal context provided.
    `void` | `stop()` | Stops the consumer.

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

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

- - ### Constructor Detail

    - #### JsonDumpConsumer

          public JsonDumpConsumer()

  - ### Method Detail

    - #### start

          public void start​(org.apache.ignite.internal.GridKernalContext ctx)

      Starts the consumer with the kernal context provided.
      Specified by:
        `start` in interface `org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.DumpConsumerKernalContextAware`
      Parameters:
        `ctx` - Kernal context.

    - #### onMappings

          public void onMappings​(Iterator<TypeMapping> mappings)

      Handles type mappings.
      Specified by:
        `onMappings` in interface `DumpConsumer`
      Parameters:
        `mappings` - Mappings iterator.

    - #### onTypes

          public void onTypes​(Iterator<BinaryType> types)

      Handles binary types.
      Specified by:
        `onTypes` in interface `DumpConsumer`
      Parameters:
        `types` - Binary types iterator.

    - #### onCacheConfigs

          public 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.
      Specified by:
        `onCacheConfigs` in interface `DumpConsumer`
      Parameters:
        `caches` - Stored cache data.

    - #### onPartition

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

      Handles cache data. This method can be invoked 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.
      Specified by:
        `onPartition` in interface `DumpConsumer`
      Parameters:
        `grp` - Group id.
        `part` - Partition.
        `data` - Cache data iterator.
      See Also:
        `DumpReaderConfiguration.threadCount()`

    - #### stop

          public void stop()

      Stops the consumer. This method can be invoked only after `DumpConsumer.start()`.
      Specified by:
        `stop` in interface `DumpConsumer`

    - #### start

          public void start()

      Starts the consumer.
      Specified by:
        `start` in interface `DumpConsumer`