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.LegacyInstancesAreScopedToHudsonNested 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLooks for any existing cache hit.voidput(Job<?, ?> job, String id, PeepholePermalink.Cache.Known target) Updates the cache.
-
Constructor Details
-
DefaultCache
public DefaultCache()
-
-
Method Details
-
get
Description copied from interface:PeepholePermalink.CacheLooks for any existing cache hit.- Specified by:
getin interfacePeepholePermalink.Cache- Parameters:
id-PermalinkProjectAction.Permalink.getId()- Returns:
PeepholePermalink.Cache.SomeorPeepholePermalink.Cache.NONEorPeepholePermalink.Cache.UNKNOWN
-
put
Description copied from interface:PeepholePermalink.CacheUpdates 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:
putin interfacePeepholePermalink.Cache- Parameters:
id-PermalinkProjectAction.Permalink.getId()target-PeepholePermalink.Cache.SomeorPeepholePermalink.Cache.NONE
-