Пример #1
0
        internal void SetTargetPlacement(PlacementResult value)
        {
            TargetActivation = value.Activation;
            TargetSilo       = value.Silo;

            if (value.IsNewPlacement)
            {
                IsNewPlacement = true;
            }
        }
Пример #2
0
        internal void SetTargetPlacement(PlacementResult value)
        {
            TargetActivation = value.Activation;
            TargetSilo       = value.Silo;

            if (value.IsNewPlacement)
            {
                IsNewPlacement = true;
            }

            if (!String.IsNullOrEmpty(value.GrainType))
            {
                NewGrainType = value.GrainType;
            }
        }
Пример #3
0
        private void SetMessageTargetPlacement(Message message, PlacementResult placementResult, ActivationAddress targetAddress)
        {
            if (placementResult.IsNewPlacement && targetAddress.Grain.IsClient())
            {
                logger.Error(ErrorCode.Dispatcher_AddressMsg_UnregisteredClient, $"AddressMessage could not find target for client pseudo-grain {message}");
                throw new KeyNotFoundException($"Attempting to send a message {message} to an unregistered client pseudo-grain {targetAddress.Grain}");
            }

            message.SetTargetPlacement(placementResult);
            if (placementResult.IsNewPlacement)
            {
                CounterStatistic.FindOrCreate(StatisticNames.DISPATCHER_NEW_PLACEMENT).Increment();
            }
            if (logger.IsEnabled(LogLevel.Trace)) logger.Trace(ErrorCode.Dispatcher_AddressMsg_SelectTarget, "AddressMessage Placement SelectTarget {0}", message);
        }
Пример #4
0
        internal void SetTargetPlacement(PlacementResult value)
        {
            if ((value.IsNewPlacement ||
                 (ContainsHeader(Header.TARGET_ACTIVATION) &&
                  !TargetActivation.Equals(value.Activation))))
            {
                RemoveHeader(Header.PRIOR_MESSAGE_ID);
                RemoveHeader(Header.PRIOR_MESSAGE_TIMES);
            }
            TargetActivation = value.Activation;
            TargetSilo       = value.Silo;

            if (value.IsNewPlacement)
            {
                IsNewPlacement = true;
            }

            if (!String.IsNullOrEmpty(value.GrainType))
            {
                NewGrainType = value.GrainType;
            }
        }
Пример #5
0
        internal void SetTargetPlacement(PlacementResult value)
        {
            TargetActivation = value.Activation;
            TargetSilo = value.Silo;

            if (value.IsNewPlacement)
                IsNewPlacement = true;

            if (!String.IsNullOrEmpty(value.GrainType))
                NewGrainType = value.GrainType;
        }