Package jenkins.model.lazy
Class BuildReference.DefaultHolderFactory
- java.lang.Object
-
- jenkins.model.lazy.BuildReference.DefaultHolderFactory
-
- All Implemented Interfaces:
ExtensionPoint
,BuildReference.HolderFactory
- Enclosing class:
- BuildReference<R>
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension(ordinal=-1.0/0.0) public static final class BuildReference.DefaultHolderFactory extends Object implements BuildReference.HolderFactory
Default factory if none other are installed. Its behavior can be controlled via the system propertyMODE_PROPERTY
:soft
(default)- Use
SoftReference
s. Builds will be kept around so long as memory pressure is not too high. weak
- Use
WeakReference
s. Builds will be kept only until the next full garbage collection cycle. strong
- Use strong references. Builds will still be loaded lazily, but once loaded, will not be released.
none
- Do not hold onto builds at all. Mainly offered as an option for the purpose of reproducing lazy-loading bugs.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static String
MODE_PROPERTY
-
Constructor Summary
Constructors Constructor Description DefaultHolderFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> BuildReference.Holder<R>
make(R referent)
Constructs a single build reference.
-
-
-
Field Detail
-
MODE_PROPERTY
public static final String MODE_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
make
public <R> BuildReference.Holder<R> make(R referent)
Description copied from interface:BuildReference.HolderFactory
Constructs a single build reference.- Specified by:
make
in interfaceBuildReference.HolderFactory
- Type Parameters:
R
- the type of thing (generallyRun
)- Parameters:
referent
- the thing to load- Returns:
- a reference, or null to consult the next factory
-
-