Interface ShardDistributionStrategy
-
public interface ShardDistributionStrategy- Author:
- Joost van de Wijgerd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidregisterWaitForRelease(ActorShard localShard, PhysicalNode currentOwner)Wait for signal from the current shard owner, when the signal comes inActorContainer.init()should be called within the implementationvoidsignalRelease(ActorShard localShard, PhysicalNode nextOwner)Signal to the cluster that a Local ActorShard has been given upbooleanwaitForReleasedShards(long waitTime, TimeUnit unit)Block until all Shard that were registered to wait for release are handled, or the specified waitTime has run out.
-
-
-
Method Detail
-
signalRelease
void signalRelease(ActorShard localShard, PhysicalNode nextOwner) throws Exception
Signal to the cluster that a Local ActorShard has been given up- Parameters:
localShard-nextOwner-- Throws:
Exception
-
registerWaitForRelease
void registerWaitForRelease(ActorShard localShard, PhysicalNode currentOwner) throws Exception
Wait for signal from the current shard owner, when the signal comes inActorContainer.init()should be called within the implementation- Parameters:
localShard-currentOwner-- Throws:
Exception
-
waitForReleasedShards
boolean waitForReleasedShards(long waitTime, TimeUnit unit)Block until all Shard that were registered to wait for release are handled, or the specified waitTime has run out.- Parameters:
waitTime-unit-
-
-