/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.batch.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The fair share policy for a scheduling policy. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class FairsharePolicy implements Serializable, Cloneable, StructuredPojo { /** ** The amount of time (in seconds) to use to calculate a fair share percentage for each fair share identifier in * use. A value of zero (0) indicates that only current usage is measured. The decay allows for more recently run * jobs to have more weight than jobs that ran earlier. The maximum supported value is 604800 (1 week). *
*/ private Integer shareDecaySeconds; /** ** A value used to reserve some of the available maximum vCPU for fair share identifiers that aren't already used. *
*
* The reserved ratio is (computeReservation/100)^ActiveFairShares
where
* ActiveFairShares
is the number of active fair share identifiers.
*
* For example, a computeReservation
value of 50 indicates that Batchreserves 50% of the maximum
* available vCPU if there's only one fair share identifier. It reserves 25% if there are two fair share
* identifiers. It reserves 12.5% if there are three fair share identifiers. A computeReservation
value
* of 25 indicates that Batch should reserve 25% of the maximum available vCPU if there's only one fair share
* identifier, 6.25% if there are two fair share identifiers, and 1.56% if there are three fair share identifiers.
*
* The minimum value is 0 and the maximum value is 99. *
*/ private Integer computeReservation; /** *
* An array of SharedIdentifier
objects that contain the weights for the fair share identifiers for the
* fair share policy. Fair share identifiers that aren't included have a default weight of 1.0
.
*
* The amount of time (in seconds) to use to calculate a fair share percentage for each fair share identifier in * use. A value of zero (0) indicates that only current usage is measured. The decay allows for more recently run * jobs to have more weight than jobs that ran earlier. The maximum supported value is 604800 (1 week). *
* * @param shareDecaySeconds * The amount of time (in seconds) to use to calculate a fair share percentage for each fair share identifier * in use. A value of zero (0) indicates that only current usage is measured. The decay allows for more * recently run jobs to have more weight than jobs that ran earlier. The maximum supported value is 604800 (1 * week). */ public void setShareDecaySeconds(Integer shareDecaySeconds) { this.shareDecaySeconds = shareDecaySeconds; } /** ** The amount of time (in seconds) to use to calculate a fair share percentage for each fair share identifier in * use. A value of zero (0) indicates that only current usage is measured. The decay allows for more recently run * jobs to have more weight than jobs that ran earlier. The maximum supported value is 604800 (1 week). *
* * @return The amount of time (in seconds) to use to calculate a fair share percentage for each fair share * identifier in use. A value of zero (0) indicates that only current usage is measured. The decay allows * for more recently run jobs to have more weight than jobs that ran earlier. The maximum supported value is * 604800 (1 week). */ public Integer getShareDecaySeconds() { return this.shareDecaySeconds; } /** ** The amount of time (in seconds) to use to calculate a fair share percentage for each fair share identifier in * use. A value of zero (0) indicates that only current usage is measured. The decay allows for more recently run * jobs to have more weight than jobs that ran earlier. The maximum supported value is 604800 (1 week). *
* * @param shareDecaySeconds * The amount of time (in seconds) to use to calculate a fair share percentage for each fair share identifier * in use. A value of zero (0) indicates that only current usage is measured. The decay allows for more * recently run jobs to have more weight than jobs that ran earlier. The maximum supported value is 604800 (1 * week). * @return Returns a reference to this object so that method calls can be chained together. */ public FairsharePolicy withShareDecaySeconds(Integer shareDecaySeconds) { setShareDecaySeconds(shareDecaySeconds); return this; } /** ** A value used to reserve some of the available maximum vCPU for fair share identifiers that aren't already used. *
*
* The reserved ratio is (computeReservation/100)^ActiveFairShares
where
* ActiveFairShares
is the number of active fair share identifiers.
*
* For example, a computeReservation
value of 50 indicates that Batchreserves 50% of the maximum
* available vCPU if there's only one fair share identifier. It reserves 25% if there are two fair share
* identifiers. It reserves 12.5% if there are three fair share identifiers. A computeReservation
value
* of 25 indicates that Batch should reserve 25% of the maximum available vCPU if there's only one fair share
* identifier, 6.25% if there are two fair share identifiers, and 1.56% if there are three fair share identifiers.
*
* The minimum value is 0 and the maximum value is 99. *
* * @param computeReservation * A value used to reserve some of the available maximum vCPU for fair share identifiers that aren't already * used. *
* The reserved ratio is (computeReservation/100)^ActiveFairShares
where
* ActiveFairShares
is the number of active fair share identifiers.
*
* For example, a computeReservation
value of 50 indicates that Batchreserves 50% of the maximum
* available vCPU if there's only one fair share identifier. It reserves 25% if there are two fair share
* identifiers. It reserves 12.5% if there are three fair share identifiers. A
* computeReservation
value of 25 indicates that Batch should reserve 25% of the maximum
* available vCPU if there's only one fair share identifier, 6.25% if there are two fair share identifiers,
* and 1.56% if there are three fair share identifiers.
*
* The minimum value is 0 and the maximum value is 99. */ public void setComputeReservation(Integer computeReservation) { this.computeReservation = computeReservation; } /** *
* A value used to reserve some of the available maximum vCPU for fair share identifiers that aren't already used. *
*
* The reserved ratio is (computeReservation/100)^ActiveFairShares
where
* ActiveFairShares
is the number of active fair share identifiers.
*
* For example, a computeReservation
value of 50 indicates that Batchreserves 50% of the maximum
* available vCPU if there's only one fair share identifier. It reserves 25% if there are two fair share
* identifiers. It reserves 12.5% if there are three fair share identifiers. A computeReservation
value
* of 25 indicates that Batch should reserve 25% of the maximum available vCPU if there's only one fair share
* identifier, 6.25% if there are two fair share identifiers, and 1.56% if there are three fair share identifiers.
*
* The minimum value is 0 and the maximum value is 99. *
* * @return A value used to reserve some of the available maximum vCPU for fair share identifiers that aren't already * used. *
* The reserved ratio is (computeReservation/100)^ActiveFairShares
where
* ActiveFairShares
is the number of active fair share identifiers.
*
* For example, a computeReservation
value of 50 indicates that Batchreserves 50% of the
* maximum available vCPU if there's only one fair share identifier. It reserves 25% if there are two fair
* share identifiers. It reserves 12.5% if there are three fair share identifiers. A
* computeReservation
value of 25 indicates that Batch should reserve 25% of the maximum
* available vCPU if there's only one fair share identifier, 6.25% if there are two fair share identifiers,
* and 1.56% if there are three fair share identifiers.
*
* The minimum value is 0 and the maximum value is 99. */ public Integer getComputeReservation() { return this.computeReservation; } /** *
* A value used to reserve some of the available maximum vCPU for fair share identifiers that aren't already used. *
*
* The reserved ratio is (computeReservation/100)^ActiveFairShares
where
* ActiveFairShares
is the number of active fair share identifiers.
*
* For example, a computeReservation
value of 50 indicates that Batchreserves 50% of the maximum
* available vCPU if there's only one fair share identifier. It reserves 25% if there are two fair share
* identifiers. It reserves 12.5% if there are three fair share identifiers. A computeReservation
value
* of 25 indicates that Batch should reserve 25% of the maximum available vCPU if there's only one fair share
* identifier, 6.25% if there are two fair share identifiers, and 1.56% if there are three fair share identifiers.
*
* The minimum value is 0 and the maximum value is 99. *
* * @param computeReservation * A value used to reserve some of the available maximum vCPU for fair share identifiers that aren't already * used. *
* The reserved ratio is (computeReservation/100)^ActiveFairShares
where
* ActiveFairShares
is the number of active fair share identifiers.
*
* For example, a computeReservation
value of 50 indicates that Batchreserves 50% of the maximum
* available vCPU if there's only one fair share identifier. It reserves 25% if there are two fair share
* identifiers. It reserves 12.5% if there are three fair share identifiers. A
* computeReservation
value of 25 indicates that Batch should reserve 25% of the maximum
* available vCPU if there's only one fair share identifier, 6.25% if there are two fair share identifiers,
* and 1.56% if there are three fair share identifiers.
*
* The minimum value is 0 and the maximum value is 99. * @return Returns a reference to this object so that method calls can be chained together. */ public FairsharePolicy withComputeReservation(Integer computeReservation) { setComputeReservation(computeReservation); return this; } /** *
* An array of SharedIdentifier
objects that contain the weights for the fair share identifiers for the
* fair share policy. Fair share identifiers that aren't included have a default weight of 1.0
.
*
SharedIdentifier
objects that contain the weights for the fair share identifiers
* for the fair share policy. Fair share identifiers that aren't included have a default weight of
* 1.0
.
*/
public java.util.List
* An array of SharedIdentifier
objects that contain the weights for the fair share identifiers for the
* fair share policy. Fair share identifiers that aren't included have a default weight of 1.0
.
*
SharedIdentifier
objects that contain the weights for the fair share identifiers
* for the fair share policy. Fair share identifiers that aren't included have a default weight of
* 1.0
.
*/
public void setShareDistribution(java.util.Collection
* An array of SharedIdentifier
objects that contain the weights for the fair share identifiers for the
* fair share policy. Fair share identifiers that aren't included have a default weight of 1.0
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setShareDistribution(java.util.Collection)} or {@link #withShareDistribution(java.util.Collection)} if * you want to override the existing values. *
* * @param shareDistribution * An array ofSharedIdentifier
objects that contain the weights for the fair share identifiers
* for the fair share policy. Fair share identifiers that aren't included have a default weight of
* 1.0
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FairsharePolicy withShareDistribution(ShareAttributes... shareDistribution) {
if (this.shareDistribution == null) {
setShareDistribution(new java.util.ArrayList
* An array of SharedIdentifier
objects that contain the weights for the fair share identifiers for the
* fair share policy. Fair share identifiers that aren't included have a default weight of 1.0
.
*
SharedIdentifier
objects that contain the weights for the fair share identifiers
* for the fair share policy. Fair share identifiers that aren't included have a default weight of
* 1.0
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FairsharePolicy withShareDistribution(java.util.Collection