static SinkContext() { IAOPConfig cfg = AOPConfig.AOPConfiguration; Type factory = cfg.LoadSinkFactory(); if (factory == null) _instance = new DefaultSinkFactory(); else _instance = (ISinkFactory)Activator.CreateInstance(factory); }
public FrontendRoutingService(ISinkFactory <IMessage> sinkFactory, INotifierFactory notifierFactory) { this.sinkFactory = Preconditions.CheckNotNull(sinkFactory, nameof(sinkFactory)); this.notifierFactory = Preconditions.CheckNotNull(notifierFactory, nameof(notifierFactory)); this.closed = new AtomicBoolean(false); this.cts = new CancellationTokenSource(); this.sinks = new AtomicReference <ImmutableDictionary <string, ISink <IMessage> > >(ImmutableDictionary <string, ISink <IMessage> > .Empty); this.notifiers = new AtomicReference <ImmutableDictionary <string, INotifier> >(ImmutableDictionary <string, INotifier> .Empty); }
static SinkContext() { IAOPConfig cfg = AOPConfig.AOPConfiguration; Type factory = cfg.LoadSinkFactory(); if (factory == null) { _instance = new DefaultSinkFactory(); } else { _instance = (ISinkFactory)Activator.CreateInstance(factory); } }
public RetryingSinkFactory(ISinkFactory <T> underlying, RetryPolicy retryPolicy) { this.underlying = Preconditions.CheckNotNull(underlying, nameof(underlying)); this.retryPolicy = Preconditions.CheckNotNull(retryPolicy, nameof(retryPolicy)); }
public IMessageSink GetObjectSink(MarshalByRefObject obj, IMessageSink nextSink) { ISinkFactory factory = SinkContext.GetFactory(); return(factory.Create(obj, nextSink)); }