DeliveryStrategy

public abstract class DeliveryStrategy

Determines the index of a shard for the given identifier of an entity.

The idea is to avoid the concurrent modification of the same Entity instance on several app nodes. Therefore an entity is put into a shard, which in turn is designed to process all the shard-incoming messages on a single application node at a time.

Inheritors

Constructors

Link copied to clipboard
public void DeliveryStrategy()

Functions

Link copied to clipboard
public final ShardIndex determineIndex(Object entityId, TypeUrl entityStateType)
Link copied to clipboard
protected abstract ShardIndex indexFor(Object entityId, TypeUrl entityStateType)
Determines the shard index for the messages heading to the entity with the specified target identifier.
Link copied to clipboard
public static ShardIndex newIndex(int indexValue, int ofTotal)
Creates a new ShardIndex according to the passed shard index The passed shard index value must be less than the total number of shards specified.
Link copied to clipboard
protected abstract int shardCount()
Tells how many shards there are according to this strategy.