Package jenkins.model
Interface PeepholePermalink.Cache
- All Superinterfaces:
ExtensionPoint
- All Known Implementing Classes:
PeepholePermalink.DefaultCache
- Enclosing class:
- PeepholePermalink
@Restricted(org.kohsuke.accmod.restrictions.Beta.class)
public static interface PeepholePermalink.Cache
extends ExtensionPoint
Persistable cache of peephole permalink targets.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
The cache entry for this target is present.static final record
There is known to be no matching build.static interface
Cacheable target of a permalink.static final record
A matching build, indicated byRun.getNumber()
.static final record
The cache entry for this target is missing.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Modifier and TypeFieldDescriptionstatic final PeepholePermalink.Cache.None
Singleton ofPeepholePermalink.Cache.None
.static final PeepholePermalink.Cache.Unknown
-
Method Summary
Modifier and TypeMethodDescriptionLooks for any existing cache hit.void
put
(Job<?, ?> job, String id, PeepholePermalink.Cache.Known target) Updates the cache.
-
Field Details
-
UNKNOWN
-
NONE
Singleton ofPeepholePermalink.Cache.None
.
-
-
Method Details
-
get
Looks for any existing cache hit.- Parameters:
id
-PermalinkProjectAction.Permalink.getId()
- Returns:
PeepholePermalink.Cache.Some
orNONE
orUNKNOWN
-
put
Updates the cache. Note that this may be called not just when a build completes or is deleted (meaning that the logical value of the cache has changed), but also whenPeepholePermalink.resolve(hudson.model.Job<?, ?>)
has failed to find a cached value (or determined that a previously cached value is in fact invalid).- Parameters:
id
-PermalinkProjectAction.Permalink.getId()
target
-PeepholePermalink.Cache.Some
orNONE
-