Interface TemporaryStorageConfig

All Superinterfaces:
Prototype.Api, Prototype.Factory<TemporaryStorage>
All Known Implementing Classes:
TemporaryStorageConfig.BuilderBase.TemporaryStorageConfigImpl

public interface TemporaryStorageConfig extends Prototype.Api
Configuration of temporary storage for classpath based handlers.
See Also:
  • Field Details

  • Method Details

    • builder

      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static TemporaryStorageConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      @Deprecated static TemporaryStorageConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      static TemporaryStorageConfig create()
      Create a new instance with default values.
      Returns:
      a new instance
    • enabled

      boolean enabled()
      Whether the temporary storage is enabled, defaults to true. If disabled, nothing is stored in temporary directory (may have performance impact, as for example a file may be extracted from a zip file on each request).
      Returns:
      whether the temporary storage is enabled
    • directory

      Optional<Path> directory()
      Location of the temporary storage, defaults to temporary storage configured for the JVM.
      Returns:
      directory of temporary storage
    • filePrefix

      String filePrefix()
      Prefix of the files in temporary storage.
      Returns:
      file prefix
    • fileSuffix

      String fileSuffix()
      Suffix of the files in temporary storage.
      Returns:
      file suffix
    • deleteOnExit

      boolean deleteOnExit()
      Whether temporary files should also be deleted on JVM exit; cache retirement and service shutdown delete extracted files independently of this setting, after active requests release them. This is enabled by default. Disabling it only disables the JVM-exit cleanup and does not retain extracted files for debugging after cache replacement, eviction, or service shutdown.
      Returns:
      whether to delete temporary files on JVM exit