public class DirectoryManifest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DirectoryManifest.Factory
Factory that encapsulates directory manifest creation.
|
static interface |
DirectoryManifest.Filter
This interface defines a filter function used during creation of the manifest.
|
static class |
DirectoryManifest.ManifestEntry
Representation of the metadata for a job file on a given underlying storage system.
|
Constructor and Description |
---|
DirectoryManifest(java.util.Set<DirectoryManifest.ManifestEntry> entries)
Create a manifest from an existing set of entries.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<DirectoryManifest.ManifestEntry> |
getDirectories()
Get all the entries that are directories for this manifest.
|
java.util.Optional<DirectoryManifest.ManifestEntry> |
getEntry(java.lang.String path)
Get the entry, if one exists, for the given path.
|
java.util.Set<DirectoryManifest.ManifestEntry> |
getFiles()
Get all the entries that are files for this manifest.
|
int |
getNumDirectories()
Get the total number of directories in this manifest.
|
int |
getNumFiles()
Get the total number of files in this manifest.
|
long |
getTotalSizeOfFiles()
Get the total size of the files contained in this manifest.
|
boolean |
hasEntry(java.lang.String path)
Check whether an entry exists for the given path.
|
public DirectoryManifest(java.util.Set<DirectoryManifest.ManifestEntry> entries)
entries
- The entries in this manifestpublic boolean hasEntry(java.lang.String path)
path
- The path to check. Relative to the root of the original job directory.true
if an entry exists for this pathpublic java.util.Optional<DirectoryManifest.ManifestEntry> getEntry(java.lang.String path)
path
- The path to get an entry for. Relative to the root of the original job directory.Optional
or Optional.empty()
if no entry existspublic java.util.Set<DirectoryManifest.ManifestEntry> getFiles()
DirectoryManifest.ManifestEntry
's as an immutable set.public java.util.Set<DirectoryManifest.ManifestEntry> getDirectories()
DirectoryManifest.ManifestEntry
's as an immutable set.public int getNumFiles()
public int getNumDirectories()
public long getTotalSizeOfFiles()