Interface Share

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
Share.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:57.768Z") @Stability(Stable) public interface Share extends software.amazon.jsii.JsiiSerializable
Represents a group of Job Definitions.

All Job Definitions that declare a share identifier will be considered members of the Share defined by that share identifier.

The Scheduler divides the maximum available vCPUs of the ComputeEnvironment among Jobs in the Queue based on their shareIdentifier and the weightFactor associated with that shareIdentifier.

Example:

 FairshareSchedulingPolicy fairsharePolicy = new FairshareSchedulingPolicy(this, "myFairsharePolicy");
 fairsharePolicy.addShare(Share.builder()
         .shareIdentifier("A")
         .weightFactor(1)
         .build());
 fairsharePolicy.addShare(Share.builder()
         .shareIdentifier("B")
         .weightFactor(1)
         .build());
 JobQueue.Builder.create(this, "JobQueue")
         .schedulingPolicy(fairsharePolicy)
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for Share
    static final class 
    An implementation for Share
  • Method Summary

    Modifier and Type
    Method
    Description
     
    The identifier of this Share.
    The weight factor given to this Share.

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Method Details

    • getShareIdentifier

      @Stability(Stable) @NotNull String getShareIdentifier()
      The identifier of this Share.

      All jobs that specify this share identifier when submitted to the queue will be considered as part of this Share.

    • getWeightFactor

      @Stability(Stable) @NotNull Number getWeightFactor()
      The weight factor given to this Share.

      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.

    • builder

      @Stability(Stable) static Share.Builder builder()
      Returns:
      a Share.Builder of Share