Enum Class RangeBacking

java.lang.Object
java.lang.Enum<RangeBacking>
dev.hardwood.s3.RangeBacking
All Implemented Interfaces:
Serializable, Comparable<RangeBacking>, Constable

public enum RangeBacking extends Enum<RangeBacking>
How an S3InputFile caches fetched byte ranges. See #373 and the _designs/REMOTE_RANGE_BACKING.md design doc.
  • Enum Constant Details

    • NONE

      public static final RangeBacking NONE
      No range cache. Every S3InputFile.readRange(long, int) call issues an HTTP GET (the tail-cache from open() still applies). This is the default — no behaviour change for existing callers and no new failure modes (writeable temp dir, disk capacity).
    • SPARSE_TEMPFILE

      public static final RangeBacking 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 than Integer.MAX_VALUE bytes. Opt in via S3Source.Builder.rangeBacking when the workload re-reads byte ranges (interactive dive is the canonical caller).

  • Method Details

    • values

      public static RangeBacking[] 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

      public static RangeBacking valueOf(String name)
      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 name
      NullPointerException - if the argument is null