Package 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 the ability to work with saved cache dump.

### Nested Class Summary

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

### Constructor Summary

Constructors
`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 grp)`
`GridKernalContext` `context()`
`File` `dumpDirectory()`
`static String` `dumpPartFileName​(int part, boolean compressed)`
`Dump.DumpedPartitionIterator` `iterator​(String node, int grp, int part)`
`List<SnapshotMetadata>` `metadata()`
`List<String>` `nodesDirectories()`
`List<Integer>` `partitions​(String node, int grp)`
`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()

Returns:
  List of snapshot metadata saved in `dumpDir`.

#### configs

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

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

#### partitions

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

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

#### iterator

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

Parameters:
  `node` - Node directory name.
  `grp` - 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.

#### context

    public GridKernalContext context()

Returns:
  Kernal context.

#### close

    public void close()
               throws Exception

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