Exemple #1
0
        public void Process()
        {
            ClientManager clientManager = null;


            lock (ConnectionManager.ConnectionTable) clientManager = (ClientManager)ConnectionManager.ConnectionTable[_clientId];
            if (clientManager != null)
            {
                Alachisoft.NCache.Common.Protobuf.Response response = new Alachisoft.NCache.Common.Protobuf.Response();
                Alachisoft.NCache.Common.Protobuf.NodeJoinedEventResponse nodeJoined = new Alachisoft.NCache.Common.Protobuf.NodeJoinedEventResponse();

                nodeJoined.clusterIp   = _clusterAddress.IpAddress.ToString();
                nodeJoined.clusterPort = _clusterAddress.Port.ToString();
                nodeJoined.serverIp    = _serverAddress.IpAddress.ToString();
                nodeJoined.serverPort  = _serverAddress.Port.ToString();
                nodeJoined.reconnect   = _reconnect;

                response.nodeJoined   = nodeJoined;
                response.responseType = Alachisoft.NCache.Common.Protobuf.Response.Type.NODE_JOINED_EVENT;

                byte[] serializedResponse = Alachisoft.NCache.Common.Util.ResponseHelper.SerializeResponse(response);

                ConnectionManager.AssureSend(clientManager, serializedResponse, Alachisoft.NCache.Common.Enum.Priority.Critical);
            }
        }
        public void Process()
        {
            ClientManager clientManager = null;

            lock (ConnectionManager.ConnectionTable) clientManager = (ClientManager)ConnectionManager.ConnectionTable[_clientId];
            if (clientManager != null)
            {
                Alachisoft.NCache.Common.Protobuf.Response response = new Alachisoft.NCache.Common.Protobuf.Response();
                Alachisoft.NCache.Common.Protobuf.NodeJoinedEventResponse nodeJoined = new Alachisoft.NCache.Common.Protobuf.NodeJoinedEventResponse();

                nodeJoined.clusterIp = _clusterAddress.IpAddress.ToString();
                nodeJoined.clusterPort = _clusterAddress.Port.ToString();
                nodeJoined.serverIp = _serverAddress.IpAddress.ToString();
                nodeJoined.serverPort = _serverAddress.Port.ToString();
                nodeJoined.reconnect = _reconnect;

                response.nodeJoined = nodeJoined;
                response.responseType = Alachisoft.NCache.Common.Protobuf.Response.Type.NODE_JOINED_EVENT;

                byte[] serializedResponse = Alachisoft.NCache.Common.Util.ResponseHelper.SerializeResponse(response);

                ConnectionManager.AssureSend(clientManager, serializedResponse, Alachisoft.NCache.Common.Enum.Priority.Critical);
            }
        }