GetNewIdAsync Method
GetNewIdAsync()
Gets a new cluster-wide unique identifier.
Declaration
ValueTask<long> GetNewIdAsync()
Returns
ValueTask<long> | A long value representing a cluster-wide unique identifier. |
Remarks
This method goes to a random member and gets a batch of IDs, which will then be returned locally for limited time. The pre-fetch size and the validity time can be configured via FlakeIdGeneratorOptions.
Values returned from this method may not be strictly ordered.
Exceptions
HazelcastException | If node ID for all members in the cluster is out of valid range. |