Package org.apache.maven.impl.model
Record Class DefaultModelBuilder.SourceCacheKey
java.lang.Object
java.lang.Record
org.apache.maven.impl.model.DefaultModelBuilder.SourceCacheKey
- All Implemented Interfaces:
CacheMetadata
,Request<Session>
- Enclosing class:
- DefaultModelBuilder
public static record DefaultModelBuilder.SourceCacheKey(Session session, RequestTrace trace, Source source, String tag)
extends Record
implements Request<Session>, CacheMetadata
-
Constructor Summary
ConstructorsConstructorDescriptionSourceCacheKey
(Session session, RequestTrace trace, Source source, String tag) Creates an instance of aSourceCacheKey
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.Returns the cache retention that should be applied to the associated data.Returns the session associated with this request.getTrace()
Returns the trace information associated with this request, if any.int
hashCode()
Returns a hash code value for this object.session()
Returns the value of thesession
record component.source()
Returns the value of thesource
record component.tag()
Returns the value of thetag
record component.toString()
Returns a string representation of this record class.trace()
Returns the value of thetrace
record component.
-
Constructor Details
-
SourceCacheKey
Creates an instance of aSourceCacheKey
record class.- Parameters:
session
- the value for thesession
record componenttrace
- the value for thetrace
record componentsource
- the value for thesource
record componenttag
- the value for thetag
record component
-
-
Method Details
-
getSession
Description copied from interface:Request
Returns the session associated with this request.- Specified by:
getSession
in interfaceRequest<Session>
- Returns:
- the session instance, never
null
-
getTrace
Description copied from interface:Request
Returns the trace information associated with this request, if any. The trace provides context about the request's position in the operation hierarchy and can carry additional diagnostic information. -
getCacheRetention
Description copied from interface:CacheMetadata
Returns the cache retention that should be applied to the associated data.- Specified by:
getCacheRetention
in interfaceCacheMetadata
- Returns:
- The CacheRetention indicating how long data should be retained, or null if no specific cache retention is defined
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
session
Returns the value of thesession
record component.- Returns:
- the value of the
session
record component
-
trace
Returns the value of thetrace
record component.- Returns:
- the value of the
trace
record component
-
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
tag
Returns the value of thetag
record component.- Returns:
- the value of the
tag
record component
-