public class ConcurrentBuilds extends PluginConfiguration<ConcurrentBuildsProperties>
  • Constructor Details

    • ConcurrentBuilds

      public ConcurrentBuilds()
  • Method Details

    • useSystemWideDefault

      public ConcurrentBuilds useSystemWideDefault(boolean useSystemWideDefault)
      Sets whether to use the system-wide default for concurrent builds.
      Parameters:
      useSystemWideDefault - if true, the system-wide default will be used. Otherwise, the maximumNumberOfConcurrentBuilds will be used.
    • maximumNumberOfConcurrentBuilds

      public ConcurrentBuilds maximumNumberOfConcurrentBuilds(int maximumNumberOfConcurrentBuilds)
      Sets the maximum number of concurrent builds. Automatically set useSystemWideDefault to false.
      Parameters:
      maximumNumberOfConcurrentBuilds - the maximum number of concurrent builds.
    • concurrentBuildsStrategy

      public ConcurrentBuilds concurrentBuildsStrategy(ConcurrentBuilds.ConcurrentBuildsStrategy concurrentBuildsStrategy)
      Specifies the strategy to use when the maximum number of concurrent builds is reached.
      Parameters:
      concurrentBuildsStrategy - the strategy to use.
      Since:
      10.0
    • blockTriggeringStrategy

      public ConcurrentBuilds blockTriggeringStrategy()
      Specifies the ConcurrentBuilds.ConcurrentBuildsStrategy.BLOCK_TRIGGERING strategy to be used when the maximum number of concurrent builds is reached. This strategy blocks the subsequent build execution until a slot is available. This is the default strategy.
      Since:
      10.0
    • stopOldestBuildsStrategy

      public ConcurrentBuilds stopOldestBuildsStrategy()
      Specifies the ConcurrentBuilds.ConcurrentBuildsStrategy.STOP_OLDEST_BUILDS strategy to be used when the maximum number of concurrent builds is reached. This strategy always allows executing the fresh build and keeps only the latest builds by stopping the old ones that don't meet the concurrent builds number limit. The build priority is determined based on the build start time.
      Since:
      10.0
    • build

      @NotNull protected @NotNull ConcurrentBuildsProperties build()
      Specified by:
      build in class PluginConfiguration<ConcurrentBuildsProperties>
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in class PluginConfiguration<ConcurrentBuildsProperties>
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class PluginConfiguration<ConcurrentBuildsProperties>