Click or drag to resize
Akka.NETIShardAllocationStrategyRebalance Method
Invoked periodically to decide which shards to rebalance to another location.

Namespace:  Akka.Cluster.Sharding
Assembly:  Akka.Cluster.Sharding (in Akka.Cluster.Sharding.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax
Task<IImmutableSet<string>> Rebalance(
	IImmutableDictionary<IActorRef, IImmutableList<string>> currentShardAllocations,
	IImmutableSet<string> rebalanceInProgress
)

Parameters

currentShardAllocations
Type: IImmutableDictionaryIActorRef, IImmutableListString
All actor refs to ShardRegion and their current allocated shards, in the order they were allocated.
rebalanceInProgress
Type: IImmutableSetString
Set of shards that are currently being rebalanced, i.e. you should not include these in the returned set.

Return Value

Type: TaskIImmutableSetString
Task of the shards to be migrated, may be empty to skip rebalance in this round.
See Also