Interface TemporaryStorageConfig
- All Superinterfaces:
Prototype.Api, Prototype.Factory<TemporaryStorage>
- All Known Implementing Classes:
TemporaryStorageConfig.BuilderBase.TemporaryStorageConfigImpl
Configuration of temporary storage for classpath based handlers.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forTemporaryStorage.static classTemporaryStorageConfig.BuilderBase<BUILDER extends TemporaryStorageConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends TemporaryStorageConfig>Fluent API builder base forTemporaryStorageConfig. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a new fluent API builder to customize configuration.builder(TemporaryStorageConfig instance) Create a new fluent API builder from an existing instance.static TemporaryStorageConfigcreate()Create a new instance with default values.static TemporaryStorageConfigCreate a new instance from configuration.booleanWhether temporary files should be deleted on JVM exit.Location of the temporary storage, defaults to temporary storage configured for the JVM.booleanenabled()Whether the temporary storage is enabled, defaults totrue.Prefix of the files in temporary storage.Suffix of the files in temporary storage.Methods inherited from interface Prototype.Factory
buildModifier and TypeMethodDescriptionbuild()Create a new instance of the runtime type from this config object.
-
Field Details
-
DEFAULT_FILE_PREFIX
-
DEFAULT_FILE_SUFFIX
-
-
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
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
enabled
boolean enabled()Whether the temporary storage is enabled, defaults totrue. 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
-
filePrefix
-
fileSuffix
-
deleteOnExit
boolean deleteOnExit()Whether temporary files should be deleted on JVM exit. This is enabled by default, yet it may be useful for debugging purposes to keep the files in place.- Returns:
- whether to delete temporary files on JVM exit
-