Package org.apache.maven.api.cache
Enum Class CacheRetention
- All Implemented Interfaces:
Serializable
,Comparable<CacheRetention>
,Constable
Enumeration defining different retention periods for cached data.
Each value represents a specific scope and lifetime for cached items.
- Since:
- 4.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCaching should be disabled for this data.Data should be persisted across Maven invocations.Data should only be retained for the current build request.Data should be retained for the duration of the current Maven session. -
Method Summary
Modifier and TypeMethodDescriptionstatic CacheRetention
Returns the enum constant of this class with the specified name.static CacheRetention[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PERSISTENT
Data should be persisted across Maven invocations. Suitable for: - Dependency resolution results - Compilation outputs - Downloaded artifacts -
SESSION_SCOPED
Data should be retained for the duration of the current Maven session. Suitable for: - Build-wide configuration - Project model caching - Inter-module metadata -
REQUEST_SCOPED
Data should only be retained for the current build request. Suitable for: - Plugin execution results - Temporary build artifacts - Phase-specific data -
DISABLED
Caching should be disabled for this data. Suitable for: - Sensitive information - Non-deterministic operations - Debug or development data
-
-
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
-