game-common / pragma.matchcapacity / CapacityProvider / add /

add #

abstract suspend fun add(gameVersion: String, gameServerZone: String, extraMatchCapacity: Int, capacityTracker: CapacityTracker)

Add extraMatchCapacity more capacity for gameVersion gameVersion. After creating the new capacity, register it with the capacityTracker.

Used by

  • MatchCapacityService: Executed when the current available capacity cannot fulfill a request to create a game instance.

Parameters #


The server version that needs to be created.


The zone the game server should be spun up in.


The amount of capacity to allocate. Value determined by MatchCapacityConfig.


Register any additionally created capacity here with CapacityTracker.addNewServer.