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 voidonCacheConfigs(Iterator<org.apache.ignite.internal.processors.cache.StoredCacheData> caches)Handles cache configs.voidonMappings(Iterator<TypeMapping> mappings)Handles type mappings.voidonPartition(int grp, int part, Iterator<DumpEntry> data)Handles cache data.voidonTypes(Iterator<BinaryType> types)Handles binary types.voidstart()Starts the consumer.voidstart(org.apache.ignite.internal.GridKernalContext ctx)Starts the consumer with the kernal context provided.voidstop()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:
startin 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:
onMappingsin interfaceDumpConsumer- Parameters:
mappings- Mappings iterator.
-
onTypes
public void onTypes(Iterator<BinaryType> types)
Handles binary types.- Specified by:
onTypesin 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:
onCacheConfigsin 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:
onPartitionin 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:
stopin interfaceDumpConsumer
-
start
public void start()
Starts the consumer.- Specified by:
startin interfaceDumpConsumer
-
-