//=========================================
        // InboundStreamInterest (operations and application)
        //=========================================

        public void HandleInboundStreamMessage(AddressType addressType, RawMessage message)
        {
            if (IsStopped)
            {
                return;
            }

            if (addressType.IsOperational)
            {
                var textMessage  = message.AsTextMessage();
                var typedMessage = OperationalMessage.MessageFrom(textMessage);
                if (typedMessage.IsApp)
                {
                    _attributesAgent.HandleInboundStreamMessage(addressType, message);
                }
                else
                {
                    _localLiveNode.Handle(typedMessage);
                }
            }
            else if (addressType.IsApplication)
            {
                _clusterApplication.HandleApplicationMessage(message, _communicationsHub.ApplicationOutboundStream); // TODO
            }
            else
            {
                Logger.Warn($"ClusterSnapshot couldn't dispatch incoming message; unknown address type: {addressType} for message: {message.AsTextMessage()}");
            }
        }
示例#2
0
        //===================================
        // Scheduled
        //===================================

        public void IntervalSignal(IScheduled <object> scheduled, object data)
        {
            _registry.CleanTimedOutNodes();

            _selfLocalLiveNode.Handle(_checkHealth);
        }