コード例 #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.ConfigModifiedEventResponse configModified = new Alachisoft.NCache.Common.Protobuf.ConfigModifiedEventResponse();

                configModified.hotConfig = _config.ToString();

                response.configModified = configModified;
                response.responseType = Alachisoft.NCache.Common.Protobuf.Response.Type.CONFIG_MODIFIED_EVENT;

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

                ConnectionManager.AssureSend(clientManager, serializedResponse, Alachisoft.NCache.Common.Enum.Priority.Critical);
            }
        }
コード例 #2
0
ファイル: ConfigModifiedEvent.cs プロジェクト: nonomal/NCache
        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.ConfigModifiedEventResponse configModified = new Alachisoft.NCache.Common.Protobuf.ConfigModifiedEventResponse();

                configModified.hotConfig = _config.ToString();

                response.configModified = configModified;
                response.responseType   = Alachisoft.NCache.Common.Protobuf.Response.Type.CONFIG_MODIFIED_EVENT;

                IList serializedResponse = Alachisoft.NCache.Common.Util.ResponseHelper.SerializeResponse(response, Common.Protobuf.Response.Type.CONFIG_MODIFIED_EVENT);

                ConnectionManager.AssureSend(clientManager, serializedResponse, false);
            }
        }