game / pragma.matchcapacity / MatchCapacityService /
class MatchCapacityService(pragmaNode: PragmaNode, instanceId: UUID, capacityManager: CapacityManager = CapacityManager(ServerStates(pragmaNode)), timeProxy: TimeProxy = TimeProxy(), reportCapacityCommand: ReportCapacityCommand = ReportCapacityCommand(capacityManager)) : DistributedService, ConfigHandler<MatchCapacityServiceConfig>
MatchCapacityService is responsible for managing overall game server capacity.
All new matches that need to be created are registered with this service. Game servers report their capacity for matches to this service, and receive in response a list of new matches to create.
Using the match capacity configuration MatchCapacityServiceConfig.matchCapacityConfig, you may define how much capacity the service should maintain. Additionally, you can configure how long your game servers have to allocate a match, how often they should report their capacity to the service, and how long the service should wait for a report to arrive before considering a game server timed out.
Reports available game server capacity. Called by game servers. Response can include a list of matches for the game server to start.
Starts a new match. When a match is started with this endpoint, it is registered as a new MatchRequest.