org.apache.ignite.internal.processors.cache.persistence.snapshot.dump

## Class Dump

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.Dump

All Implemented Interfaces:
  AutoCloseable

    public class Dump
    extends Object
    implements AutoCloseable

This class provides ability to work with saved cache dump.

### Nested Class Summary

Nested Classes
`static interface` `Dump.DumpedPartitionIterator` Closeable dump iterator.

### Constructor Summary

Constructors
Constructor and Description
`Dump(File dumpDir, boolean keepBinary, boolean raw, IgniteLogger log)`
`Dump(File dumpDir, @Nullable String consistentId, boolean keepBinary, boolean raw, @Nullable EncryptionSpi encSpi, IgniteLogger log)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `close()`
`List<StoredCacheData>` `configs(String node, int group)`
`File` `dumpDirectory()`
`static String` `dumpPartFileName(int part, boolean compressed)`
`Dump.DumpedPartitionIterator` `iterator(String node, int group, int part)`
`List<SnapshotMetadata>` `metadata()`
`List<String>` `nodesDirectories()`
`List<Integer>` `partitions(String node, int group)`
`Iterator<BinaryType>` `types()`

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

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

### Constructor Detail

#### Dump

    public Dump(File dumpDir,
                boolean keepBinary,
                boolean raw,
                IgniteLogger log)

Parameters:
  `dumpDir` - Dump directory.
  `keepBinary` - If `true` then keep read entries in binary form.
  `raw` - If `true` then keep read entries in form of `KeyCacheObject` and `CacheObject`.
  `log` - Logger.

#### Dump

    public Dump(File dumpDir,
                @Nullable
                @Nullable String consistentId,
                boolean keepBinary,
                boolean raw,
                @Nullable
                @Nullable EncryptionSpi encSpi,
                IgniteLogger log)

Parameters:
  `dumpDir` - Dump directory.
  `consistentId` - If specified, read dump data only for specific node.
  `keepBinary` - If `true` then keep read entries in binary form.
  `raw` - If `true` then keep read entries in form of `KeyCacheObject` and `CacheObject`.
  `encSpi` - Encryption SPI instance.
  `log` - Logger.

### Method Detail

#### types

    public Iterator<BinaryType> types()

Returns:
  Binary types iterator.

#### nodesDirectories

    public List<String> nodesDirectories()

Returns:
  List of node directories.

#### metadata

    public List<SnapshotMetadata> metadata()
                                    throws IOException,
                                           IgniteCheckedException

Returns:
  List of snapshot metadata saved in `dumpDir`.
Throws:
  `IOException`
  `IgniteCheckedException`

#### configs

    public List<StoredCacheData> configs(String node,
                                         int group)

Parameters:
  `node` - Node directory name.
  `group` - Group id.
Returns:
  List of cache configs saved in dump for group.

#### partitions

    public List<Integer> partitions(String node,
                                    int group)

Parameters:
  `node` - Node directory name.
  `group` - Group id.
Returns:
  Dump iterator.

#### iterator

    public Dump.DumpedPartitionIterator iterator(String node,
                                                 int group,
                                                 int part)

Parameters:
  `node` - Node directory name.
  `group` - Group id.
Returns:
  Dump iterator.

#### dumpPartFileName

    public static String dumpPartFileName(int part,
                                          boolean compressed)

Parameters:
  `part` - Partition number.
  `compressed` - If `true` then compressed partition file.
Returns:
  Dump partition file name.

#### dumpDirectory

    public File dumpDirectory()

Returns:
  Root dump directory.

#### close

    public void close()
               throws Exception

Specified by:
  `close` in interface `AutoCloseable`
Throws:
  `Exception`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023