Class AbstractLeastShardAllocationStrategy
Common logic for the least shard allocation strategy implementations
Inheritance
AbstractLeastShardAllocationStrategy
Assembly: Akka.Cluster.Sharding.dll
Syntax
public abstract class AbstractLeastShardAllocationStrategy : IActorSystemDependentAllocationStrategy, IShardAllocationStrategy, INoSerializationVerificationNeeded
Properties
|
Improve this Doc
View Source
ClusterState
Declaration
protected virtual ClusterEvent.CurrentClusterState ClusterState { get; }
Property Value
|
Improve this Doc
View Source
SelfMember
Declaration
protected virtual Member SelfMember { get; }
Property Value
Methods
|
Improve this Doc
View Source
AllocateShard(IActorRef, String, IImmutableDictionary<IActorRef, IImmutableList<String>>)
Declaration
public async Task<IActorRef> AllocateShard(IActorRef requester, string shardId, IImmutableDictionary<IActorRef, IImmutableList<string>> currentShardAllocations)
Parameters
Type |
Name |
Description |
IActorRef |
requester |
|
String |
shardId |
|
System.Collections.Immutable.IImmutableDictionary<IActorRef, System.Collections.Immutable.IImmutableList<String>> |
currentShardAllocations |
|
Returns
|
Improve this Doc
View Source
IsAGoodTimeToRebalance(IEnumerable<AbstractLeastShardAllocationStrategy.RegionEntry>)
Declaration
protected bool IsAGoodTimeToRebalance(IEnumerable<AbstractLeastShardAllocationStrategy.RegionEntry> regionEntries)
Parameters
Returns
|
Improve this Doc
View Source
MostSuitableRegion(IEnumerable<AbstractLeastShardAllocationStrategy.RegionEntry>)
Declaration
protected (IActorRef Region, IImmutableList<string> Shards) MostSuitableRegion(IEnumerable<AbstractLeastShardAllocationStrategy.RegionEntry> regionEntries)
Parameters
Returns
Type |
Description |
System.ValueTuple<IActorRef, System.Collections.Immutable.IImmutableList<String>> |
|
|
Improve this Doc
View Source
Rebalance(IImmutableDictionary<IActorRef, IImmutableList<String>>, IImmutableSet<String>)
Declaration
public abstract Task<IImmutableSet<string>> Rebalance(IImmutableDictionary<IActorRef, IImmutableList<string>> currentShardAllocations, IImmutableSet<string> rebalanceInProgress)
Parameters
Type |
Name |
Description |
System.Collections.Immutable.IImmutableDictionary<IActorRef, System.Collections.Immutable.IImmutableList<String>> |
currentShardAllocations |
|
System.Collections.Immutable.IImmutableSet<String> |
rebalanceInProgress |
|
Returns
Type |
Description |
Task<System.Collections.Immutable.IImmutableSet<String>> |
|
|
Improve this Doc
View Source
RegionEntriesFor(IImmutableDictionary<IActorRef, IImmutableList<String>>)
Declaration
protected ImmutableList<AbstractLeastShardAllocationStrategy.RegionEntry> RegionEntriesFor(IImmutableDictionary<IActorRef, IImmutableList<string>> currentShardAllocations)
Parameters
Type |
Name |
Description |
System.Collections.Immutable.IImmutableDictionary<IActorRef, System.Collections.Immutable.IImmutableList<String>> |
currentShardAllocations |
|
Returns
|
Improve this Doc
View Source
Start(ActorSystem)
Declaration
public void Start(ActorSystem system)
Parameters
Implements
Extension Methods