Class 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 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.
      • 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()
      • start

        public void start()
        Starts the consumer.
        Specified by:
        start in interface DumpConsumer