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.
-
-
-
Method Detail
-
start
public void start(org.apache.ignite.internal.GridKernalContext ctx)
Starts the consumer with the kernal context provided.- Specified by:
start
in interfaceorg.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 interfaceDumpConsumer
- Parameters:
mappings
- Mappings iterator.
-
onTypes
public void onTypes(Iterator<BinaryType> types)
Handles binary types.- Specified by:
onTypes
in interfaceDumpConsumer
- 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 interfaceDumpConsumer
- 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 interfaceDumpConsumer
- 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 afterDumpConsumer.start()
.- Specified by:
stop
in interfaceDumpConsumer
-
start
public void start()
Starts the consumer.- Specified by:
start
in interfaceDumpConsumer
-
-