Interface IPartitionManager
Partition manager provides table partition information.
public interface IPartitionManager
Methods
GetPartitionAsync(IIgniteTuple)
Gets the partition for the specified table key.
ValueTask<IPartition> GetPartitionAsync(IIgniteTuple tuple)
Parameters
tuple
IIgniteTupleTable key tuple.
Returns
- ValueTask<IPartition>
Partition that contains the specified key.
GetPartitionAsync<TK>(TK)
Gets the partition for the specified table key.
ValueTask<IPartition> GetPartitionAsync<TK>(TK key) where TK : notnull
Parameters
key
TKTable key.
Returns
- ValueTask<IPartition>
Partition that contains the specified key.
Type Parameters
TK
Key type.
GetPrimaryReplicaAsync(IPartition)
Gets the primary replica for the specified partition.
NOTE: Prefer this method over GetPrimaryReplicasAsync() for performance-critical code.ValueTask<IClusterNode> GetPrimaryReplicaAsync(IPartition partition)
Parameters
partition
IPartitionPartition.
Returns
- ValueTask<IClusterNode>
Primary replica.
GetPrimaryReplicasAsync()
Gets the primary replicas for all partitions.
NOTE: Prefer GetPrimaryReplicaAsync(IPartition) for performance-critical code.ValueTask<IReadOnlyDictionary<IPartition, IClusterNode>> GetPrimaryReplicasAsync()
Returns
- ValueTask<IReadOnlyDictionary<IPartition, IClusterNode>>
Map of partition to primary replica node.