Skip to main content
Table of Contents

Class BucketCalculator

Namespace
Stratara.Shared.Partitioning
Assembly
Stratara.Shared.dll

Pure-function bucket id calculator. Maps a Guid identifier to a stable bucket index in the closed range [0, BucketConstants.TotalBucketCount) by absolute-hash modulo. Used by projection / saga partitioning to spread work deterministically across workers.

public static class BucketCalculator
Inheritance
BucketCalculator
Inherited Members

Methods

GetBucketId(Guid)

Returns a stable bucket id in [0, BucketConstants.TotalBucketCount) for the given id.

public static int GetBucketId(Guid id)

Parameters

id Guid

The identifier to hash.

Returns

int

A non-negative bucket index smaller than TotalBucketCount.