public static class Options.HandleOpt extends Object
PathHandle
references.Modifier and Type | Class and Description |
---|---|
static class |
Options.HandleOpt.Data
Option storing standard constraints on data.
|
static class |
Options.HandleOpt.Location
Option storing standard constraints on location.
|
Modifier | Constructor and Description |
---|---|
protected |
HandleOpt() |
Modifier and Type | Method and Description |
---|---|
static Options.HandleOpt.Data |
changed(boolean allow) |
static Options.HandleOpt[] |
content()
Handle is valid iff the content of the referent is the same.
|
static Options.HandleOpt[] |
exact()
Handle is valid iff the referent is neither moved nor changed.
|
static <T extends Options.HandleOpt> |
getOpt(Class<T> c,
Options.HandleOpt... opt)
Utility method to extract a HandleOpt from the set provided.
|
static Options.HandleOpt.Location |
moved(boolean allow) |
static Options.HandleOpt[] |
path()
Handle is valid iff the referent is unmoved in the namespace.
|
static Options.HandleOpt[] |
reference()
Handle is valid iff the referent exists in the namespace.
|
static Function<FileStatus,PathHandle> |
resolve(BiFunction<FileStatus,Options.HandleOpt[],PathHandle> fsr,
Options.HandleOpt... opt)
Utility function for partial evaluation of
FileStatus
instances to a fixed set of handle options. |
static Function<FileStatus,PathHandle> |
resolve(FileSystem fs,
Options.HandleOpt... opt)
Utility function for mapping
FileSystem.getPathHandle(org.apache.hadoop.fs.FileStatus, org.apache.hadoop.fs.Options.HandleOpt...) to a
fixed set of handle options. |
public static Function<FileStatus,PathHandle> resolve(FileSystem fs, Options.HandleOpt... opt)
FileSystem.getPathHandle(org.apache.hadoop.fs.FileStatus, org.apache.hadoop.fs.Options.HandleOpt...)
to a
fixed set of handle options.fs
- Target filesystemopt
- Options to bind in partially evaluated functionpublic static Function<FileStatus,PathHandle> resolve(BiFunction<FileStatus,Options.HandleOpt[],PathHandle> fsr, Options.HandleOpt... opt)
FileStatus
instances to a fixed set of handle options.fsr
- Function referenceopt
- Options to associate with FileStatus
instances to
produce PathHandle
instances.public static Options.HandleOpt[] exact()
public static Options.HandleOpt[] content()
public static Options.HandleOpt[] path()
public static Options.HandleOpt[] reference()
public static Options.HandleOpt.Data changed(boolean allow)
allow
- If true, resolve references to this entity even if it has
been modified.public static Options.HandleOpt.Location moved(boolean allow)
allow
- If true, resolve references to this entity anywhere in
the namespace.public static <T extends Options.HandleOpt> Optional<T> getOpt(Class<T> c, Options.HandleOpt... opt)
T
- Type constraint for exact matchc
- Target classopt
- List of optionsIllegalArgumentException
- If more than one matching type is found.Copyright © 2008–2020 Apache Software Foundation. All rights reserved.