Interface StorageExtension

All Known Subinterfaces:
InternalStorageExtension

public interface StorageExtension
An extension that provides a storage backend for an HttpCache.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    inMemory(long maxSize)
    Returns a StorageExtension for saving data in memory, not exceeding the given size.
    onDisk(Path directory, long maxSize)
    Returns a StorageExtension for saving data on disk under the given directory, not exceeding the given size.
  • Method Details

    • inMemory

      static StorageExtension inMemory(long maxSize)
      Returns a StorageExtension for saving data in memory, not exceeding the given size.
    • onDisk

      static StorageExtension onDisk(Path directory, long maxSize)
      Returns a StorageExtension for saving data on disk under the given directory, not exceeding the given size.
      Throws:
      IllegalArgumentException - if maxSize is not positive