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 #
gameVersion | The server version that needs to be created. |
gameServerZone | The zone the game server should be spun up in. |
extraMatchCapacity | The amount of capacity to allocate. Value determined by MatchCapacityConfig. |
capacityTracker | Register any additionally created capacity here with CapacityTracker.addNewServer. |