Enum Class RangeBacking
- All Implemented Interfaces:
Serializable, Comparable<RangeBacking>, Constable
How an
S3InputFile caches fetched byte ranges. See #373 and the
_designs/REMOTE_RANGE_BACKING.md design doc.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo range cache.Whole-file cache backed by a sparse temp file mmapped into the process. -
Method Summary
Modifier and TypeMethodDescriptionstatic RangeBackingReturns the enum constant of this class with the specified name.static RangeBacking[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No range cache. EveryS3InputFile.readRange(long, int)call issues an HTTPGET(the tail-cache fromopen()still applies). This is the default — no behaviour change for existing callers and no new failure modes (writeable temp dir, disk capacity). -
SPARSE_TEMPFILE
Whole-file cache backed by a sparse temp file mmapped into the process. Fetched byte ranges are written into the mapping; repeat reads slice the mapping zero-copy. Real footprint is proportional to bytes touched, not file size, on filesystems that support sparse files.
Inherits the 2 GB cap from
MappedByteBuffer.slice(int, int); not usable for files larger thanInteger.MAX_VALUEbytes. Opt in viaS3Source.Builder.rangeBackingwhen the workload re-reads byte ranges (interactivediveis the canonical caller).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-