Class Share.Builder

java.lang.Object
software.amazon.awscdk.services.batch.Share.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<Share>
Enclosing interface:
Share

@Stability(Stable) public static final class Share.Builder extends Object implements software.amazon.jsii.Builder<Share>
A builder for Share
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • shareIdentifier

      @Stability(Stable) public Share.Builder shareIdentifier(String shareIdentifier)
      Sets the value of Share.getShareIdentifier()
      Parameters:
      shareIdentifier - The identifier of this Share. This parameter is required. All jobs that specify this share identifier when submitted to the queue will be considered as part of this Share.
      Returns:
      this
    • weightFactor

      @Stability(Stable) public Share.Builder weightFactor(Number weightFactor)
      Sets the value of Share.getWeightFactor()
      Parameters:
      weightFactor - The weight factor given to this Share. This parameter is required. The Scheduler decides which jobs to put in the Compute Environment such that the following ratio is equal for each job:

      sharevCpu / weightFactor,

      where sharevCpu is the total amount of vCPU given to that particular share; that is, the sum of the vCPU of each job currently in the Compute Environment for that share.

      See the readme of this module for a detailed example that shows how these are used, how it relates to computeReservation, and how shareDecay affects these calculations.

      Returns:
      this
    • build

      @Stability(Stable) public Share build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<Share>
      Returns:
      a new instance of Share
      Throws:
      NullPointerException - if any required attribute was not provided