예제 #1
0
 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);
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
 private void TakeOwnership(TakeOwnership msg)
 {
     _partition[msg.Name] = msg.Pid;
 }