Interface PriorityConfiguration

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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-11T18:01:25.567Z") @Stability(Experimental) public interface PriorityConfiguration extends software.amazon.jsii.JsiiSerializable
(experimental) Custom prioritization settings for use by a game session queue when placing new game sessions with available game servers.

When defined, this configuration replaces the default FleetIQ prioritization process, which is as follows:

  • If player latency data is included in a game session request, destinations and locations are prioritized first based on lowest average latency (1), then on lowest hosting cost (2), then on destination list order (3), and finally on location (alphabetical) (4). This approach ensures that the queue's top priority is to place game sessions where average player latency is lowest, and--if latency is the same--where the hosting cost is less, etc.
  • If player latency data is not included, destinations and locations are prioritized first on destination list order (1), and then on location (alphabetical) (2). This approach ensures that the queue's top priority is to place game sessions on the first destination fleet listed. If that fleet has multiple locations, the game session is placed on the first location (when listed alphabetically).

Changing the priority order will affect how game sessions are placed.

Example:

 BuildFleet fleet;
 Topic topic;
 GameSessionQueue.Builder.create(this, "MyGameSessionQueue")
         .gameSessionQueueName("test-gameSessionQueue")
         .customEventData("test-event-data")
         .allowedLocations(List.of("eu-west-1", "eu-west-2"))
         .destinations(List.of(fleet))
         .notificationTarget(topic)
         .playerLatencyPolicies(List.of(PlayerLatencyPolicy.builder()
                 .maximumIndividualPlayerLatency(Duration.millis(100))
                 .policyDuration(Duration.seconds(300))
                 .build()))
         .priorityConfiguration(PriorityConfiguration.builder()
                 .locationOrder(List.of("eu-west-1", "eu-west-2"))
                 .priorityOrder(List.of(PriorityType.LATENCY, PriorityType.COST, PriorityType.DESTINATION, PriorityType.LOCATION))
                 .build())
         .timeout(Duration.seconds(300))
         .build();
 
  • Method Details

    • getLocationOrder

      @Stability(Experimental) @NotNull List<String> getLocationOrder()
      (experimental) The prioritization order to use for fleet locations, when the PriorityOrder property includes LOCATION.

      Locations are identified by AWS Region codes such as `us-west-2.

      Each location can only be listed once.

    • getPriorityOrder

      @Stability(Experimental) @NotNull List<PriorityType> getPriorityOrder()
      (experimental) The recommended sequence to use when prioritizing where to place new game sessions.

      Each type can only be listed once.

    • builder

      @Stability(Experimental) static PriorityConfiguration.Builder builder()
      Returns:
      a PriorityConfiguration.Builder of PriorityConfiguration