示例#1
0
        public override bool Process <T1>(Message <T1> message) where T1 : Org.Neo4j.cluster.com.message.MessageType
        {
            if (!message.Internal && !message.MessageType.Equals(HeartbeatMessage.IAmAlive))
            {
                try
                {
                    string to = message.GetHeader(Message.HEADER_TO);

                    InstanceId serverId = _clusterContext.Configuration.getIdForUri(new URI(to));

                    if (!_clusterContext.isMe(serverId))
                    {
                        _outgoing.offer(Message.@internal(HeartbeatMessage.ResetSendHeartbeat, serverId));
                    }
                }
                catch (URISyntaxException e)
                {
                    Console.WriteLine(e.ToString());
                    Console.Write(e.StackTrace);
                }
            }
            return(true);
        }