コード例 #1
0
        public CommandableCache(ICommandReceiver commandReceiver, int cacheExpiryInSeconds)
            : base(cacheExpiryInSeconds)
        {
            _commandReceiver = commandReceiver;

            try {
                // subscribe for the command to burst the routing cache.  Pass a cache
                // reference into the cache buster that handles incoming BurstRoutingCache commands
                _commandReceiver.ReceiveCommand(new RoutingCacheBuster(_routingInfoCache, _cacheLock, _cacheExpiryInSeconds));
            }
            catch (MessageException cex) {
                Log.Warn("Failed to subscribe for Routing Cache Bust commands - the cache cannot be remotely commanded.", cex);
            }
        }
コード例 #2
0
ファイル: CommandableCache.cs プロジェクト: jar349/AMP
        public CommandableCache(ICommandReceiver commandReceiver, int cacheExpiryInSeconds)
            : base(cacheExpiryInSeconds)
        {
            _commandReceiver = commandReceiver;

            try {
                // subscribe for the command to burst the routing cache.  Pass a cache
                // reference into the cache buster that handles incoming BurstRoutingCache commands
                _commandReceiver.ReceiveCommand(new RoutingCacheBuster(_routingInfoCache, _cacheLock, _cacheExpiryInSeconds));
            }
            catch (MessageException cex) {
                Log.Warn("Failed to subscribe for Routing Cache Bust commands - the cache cannot be remotely commanded.", cex);
            }
        }
コード例 #3
0
ファイル: DefaultCommandBus.cs プロジェクト: jar349/AMP
 public void ReceiveCommand(ICommandHandler handler)
 {
     _commandReceiver.ReceiveCommand(handler);
 }