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/
  • Constructor Details

    • LockedResourcesBuildAction

      public LockedResourcesBuildAction()
  • Method Details

    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getCurrentUsedResourceNames

      public List<String> getCurrentUsedResourceNames()
    • addUsedResources

      public void addUsedResources(List<String> resourceNames)
    • removeUsedResources

      public void removeUsedResources(List<String> resourceNames)
    • findAndInitAction

      public static LockedResourcesBuildAction findAndInitAction(Run<?,?> build)
    • addLog

      public static void addLog(Run<?,?> build, List<String> resourceNames, String step, String action)
    • addLog

      public static void addLog(Run<?,?> build, String resourceName, String step, String action)
    • addLog

      public void addLog(String resourceName, String step, String action)
    • getReadOnlyLogs

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<LockedResourcesBuildAction.LogEntry> getReadOnlyLogs()
    • getReadOnlyResourcesInUse

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<String> getReadOnlyResourcesInUse()
    • writeReplace

      protected Object writeReplace()
      Ensure iteration during XStream marshalling is also synchronized, otherwise we tend to get ConcurrentModificationException.
      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.