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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.shareIdentifier
(String shareIdentifier) Sets the value ofShare.getShareIdentifier()
weightFactor
(Number weightFactor) Sets the value ofShare.getWeightFactor()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
weightFactor
Sets the value ofShare.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 howshareDecay
affects these calculations.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<Share>
- Returns:
- a new instance of
Share
- Throws:
NullPointerException
- if any required attribute was not provided