Esempio n. 1
0
 public IFABChannelGroup Flush(IFABChannelMatcher matcher)
 {
     foreach (IFABChannel c in this.nonServerChannels.Values)
     {
         if (matcher.Matches(c))
         {
             c.Flush();
         }
     }
     return(this);
 }
Esempio n. 2
0
        public Task WriteAsync(FABMessage message, IFABChannelMatcher matcher)
        {
            Contract.Requires(message != null);
            Contract.Requires(matcher != null);
            var futures = new Dictionary <IFABChannel, Task>();

            foreach (FABChannel c in this.nonServerChannels.Values)
            {
                if (matcher.Matches(c))
                {
                    futures.Add(c, c.WriteAsync(SafeDuplicate(message)));
                }
            }

            ReferenceCountUtil.Release(message);
            return(new FABChannelGroupCompletionSource(this, futures /*, this.executor*/).Task);
        }
Esempio n. 3
0
        public Task NewCloseFuture(IFABChannelMatcher matcher)
        {
            Contract.Requires(matcher != null);
            var futures = new Dictionary <IFABChannel, Task>();

            foreach (IFABChannel c in this.nonServerChannels.Values)
            {
                if (matcher.Matches(c))
                {
                    futures.Add(c, c.CloseCompletion);
                }
            }
            foreach (IFABChannel c in this.serverChannels.Values)
            {
                if (matcher.Matches(c))
                {
                    futures.Add(c, c.CloseCompletion);
                }
            }

            return(new FABChannelGroupCompletionSource(this, futures /*, this.executor*/).Task);
        }
Esempio n. 4
0
 public Task WriteAsync(object message, IFABChannelMatcher matcher)
 {
     return(this.WriteAsync(message, matcher));
 }
Esempio n. 5
0
 public static IFABChannelMatcher Invert(IFABChannelMatcher matcher)
 {
     return(new InvertMatcher(matcher));
 }
Esempio n. 6
0
 public InvertMatcher(IFABChannelMatcher matcher)
 {
     this.matcher = matcher;
 }