counter Capacity
Retrieves the current capacity of the counter with the supplied name. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource. If no counter with this name exists, an appropriate exception will be thrown.
The Counts and Lists API will eventually supersede the specific player tracking APIs of the AgonesSdk, as these cover a broader use-case and offer similar interfaces for tracking. Therefore, this method should be preferred.
Return
The current capacity of the counter with the supplied name. This is guaranteed to be between 0
and the capacity of this counter.
Parameters
The unique identifier of this instance's counter whose capacity should be queried.
See also
Throws
If null
is supplied as the counter identifier and therefore no counter can be derived from it.
Sets a new capacity for the counter with the supplied name. If no counter with this name exists or the capacity is not in the interval [0, Long.MAX_VALUE]
, an appropriate exception will be thrown.
The Counts and Lists API will eventually supersede the specific player tracking APIs of the AgonesSdk, as these cover a broader use-case and offer similar interfaces for tracking. Therefore, this method should be preferred.
Parameters
The unique identifier of this instance's counter whose capacity should be modified.
The new capacity that should be applied to the desired counter.
See also
Throws
If null
is supplied as the counter identifier and therefore no counter can be derived from it.