private void TakeOwnership(TakeOwnership msg, IContext context) { _logger.LogDebug($"Kind {_kind} Take Ownership name: {msg.Name}, pid: {msg.Pid}"); _partition[msg.Name] = msg.Pid; _reversePartition[msg.Pid] = msg.Name; context.Watch(msg.Pid); }
private void TakeOwnership(TakeOwnership msg, IContext context) { //Check again if I'm the owner var address = MemberList.GetPartition(msg.Name, _kind); if (!string.IsNullOrEmpty(address) && address != ProcessRegistry.Instance.Address) { //if not, forward to the correct owner var owner = Partition.PartitionForKind(address, _kind); owner.Tell(msg); } else { _logger.LogDebug($"Kind {_kind} Take Ownership name: {msg.Name}, pid: {msg.Pid}"); _partition[msg.Name] = msg.Pid; _reversePartition[msg.Pid] = msg.Name; context.Watch(msg.Pid); } }
private void TakeOwnership(TakeOwnership msg) { _partition[msg.Name] = msg.Pid; }