public async Task Reset() { if (streamDirectory != null) { var tmp = streamDirectory; streamDirectory = null; // null streamDirectory now, just to make sure we call cleanup only once, in all cases. await tmp.Cleanup(true, true); } }
public void StreamingInitialize() { grainBasedPubSub = new GrainBasedPubSubRuntime(GrainFactory); var tmp = new ImplicitStreamPubSub(this.grainFactory, this.implicitSubscriberTable); implicitPubSub = tmp; combinedGrainBasedAndImplicitPubSub = new StreamPubSubImpl(grainBasedPubSub, tmp); streamDirectory = new StreamDirectory(); }
public void StreamingInitialize(ImplicitStreamSubscriberTable implicitStreamSubscriberTable) { if (null == implicitStreamSubscriberTable) { throw new ArgumentNullException("implicitStreamSubscriberTable"); } grainBasedPubSub = new GrainBasedPubSubRuntime(GrainFactory); var tmp = new ImplicitStreamPubSub(implicitStreamSubscriberTable); implictPubSub = tmp; combinedGrainBasedAndImplicitPubSub = new StreamPubSubImpl(grainBasedPubSub, tmp); streamDirectory = new StreamDirectory(); }
public ClientStreamingProviderRuntime( IInternalGrainFactory grainFactory, IServiceProvider serviceProvider, ILoggerFactory loggerFactory, ImplicitStreamSubscriberTable implicitSubscriberTable, ClientGrainContext clientContext) { this.grainFactory = grainFactory; this.ServiceProvider = serviceProvider; this.implicitSubscriberTable = implicitSubscriberTable; this.clientContext = clientContext; this.runtimeClient = serviceProvider.GetService <IRuntimeClient>(); //all async timer created through current class all share this logger for perf reasons this.timerLogger = loggerFactory.CreateLogger <AsyncTaskSafeTimer>(); grainBasedPubSub = new GrainBasedPubSubRuntime(GrainFactory); var tmp = new ImplicitStreamPubSub(this.grainFactory, this.implicitSubscriberTable); implicitPubSub = tmp; combinedGrainBasedAndImplicitPubSub = new StreamPubSubImpl(grainBasedPubSub, tmp); streamDirectory = new StreamDirectory(); }