Package jenkins.model
Class PeepholePermalink.DefaultCache
java.lang.Object
jenkins.model.PeepholePermalink.DefaultCache
- All Implemented Interfaces:
ExtensionPoint
,PeepholePermalink.Cache
- Enclosing class:
- PeepholePermalink
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
@Extension(ordinal=-1000.0)
public static final class PeepholePermalink.DefaultCache
extends Object
implements PeepholePermalink.Cache
Default cache based on a
permalinks
file in the build directory.
There is one line per cached permalink, in the format lastStableBuild 123
or (for a negative cache) lastFailedBuild -1
.-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface jenkins.model.PeepholePermalink.Cache
PeepholePermalink.Cache.Known, PeepholePermalink.Cache.None, PeepholePermalink.Cache.PermalinkTarget, PeepholePermalink.Cache.Some, PeepholePermalink.Cache.Unknown
-
Field Summary
Fields inherited from interface jenkins.model.PeepholePermalink.Cache
NONE, UNKNOWN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionLooks for any existing cache hit.void
put
(Job<?, ?> job, String id, PeepholePermalink.Cache.Known target) Updates the cache.
-
Constructor Details
-
DefaultCache
public DefaultCache()
-
-
Method Details
-
get
Description copied from interface:PeepholePermalink.Cache
Looks for any existing cache hit.- Specified by:
get
in interfacePeepholePermalink.Cache
id
-PermalinkProjectAction.Permalink.getId()
- Returns:
PeepholePermalink.Cache.Some
orPeepholePermalink.Cache.NONE
orPeepholePermalink.Cache.UNKNOWN
-
put
Description copied from interface:PeepholePermalink.Cache
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).- Specified by:
put
in interfacePeepholePermalink.Cache
id
-PermalinkProjectAction.Permalink.getId()
target
-PeepholePermalink.Cache.Some
orPeepholePermalink.Cache.NONE
-