Class LockedResourcesBuildAction
java.lang.Object
org.jenkins.plugins.lockableresources.actions.LockedResourcesBuildAction
- All Implemented Interfaces:
Action,ModelObject
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class LockedResourcesBuildAction
extends Object
implements Action
BuildAction for lockable resources.
Shows usage of resources in the build page.
url: jobUrl/buildNr/locked-resources/
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidvoidvoidaddUsedResources(List<String> resourceNames) static LockedResourcesBuildActionfindAndInitAction(Run<?, ?> build) voidremoveUsedResources(List<String> resourceNames) protected ObjectEnsure iteration during XStream marshalling is also synchronized, otherwise we tend to getConcurrentModificationException.
The recommended approach is to copy-on-write the properties so a snapshot can always be scraped consistently.
-
Constructor Details
-
LockedResourcesBuildAction
public LockedResourcesBuildAction()
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getCurrentUsedResourceNames
-
addUsedResources
-
removeUsedResources
-
findAndInitAction
-
addLog
-
addLog
-
addLog
-
getReadOnlyLogs
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<LockedResourcesBuildAction.LogEntry> getReadOnlyLogs() -
getReadOnlyResourcesInUse
-
writeReplace
Ensure iteration during XStream marshalling is also synchronized, otherwise we tend to getConcurrentModificationException.
The recommended approach is to copy-on-write the properties so a snapshot can always be scraped consistently. But this can be costly at run-time, so we use the next-best option: produce a consistent replica of the current object for actual saving only on demand.
This method is found by XStream via reflection.
-