public HostedClient( IRuntimeClient runtimeClient, ClientObserverRegistrar clientObserverRegistrar, ILocalSiloDetails siloDetails, ILogger <HostedClient> logger, IGrainReferenceRuntime grainReferenceRuntime, IInternalGrainFactory grainFactory, InvokableObjectManager invokableObjectManager, MessageCenter messageCenter, MessagingTrace messagingTrace) { this.incomingMessages = Channel.CreateUnbounded <Message>(new UnboundedChannelOptions { SingleReader = true, SingleWriter = false, AllowSynchronousContinuations = false, }); this.runtimeClient = runtimeClient; this.clientObserverRegistrar = clientObserverRegistrar; this.grainReferenceRuntime = grainReferenceRuntime; this.grainFactory = grainFactory; this.invokableObjects = invokableObjectManager; this.siloMessageCenter = messageCenter; this.messagingTrace = messagingTrace; this.logger = logger; this.ClientAddress = ActivationAddress.NewActivationAddress(siloDetails.SiloAddress, GrainId.NewClientId()); }
public InsideRuntimeClient( ILocalSiloDetails siloDetails, GrainTypeManager typeManager, TypeMetadataCache typeMetadataCache, OrleansTaskScheduler scheduler, IServiceProvider serviceProvider, MessageFactory messageFactory, ITransactionAgent transactionAgent, ILoggerFactory loggerFactory, IOptions <SiloMessagingOptions> messagingOptions, IGrainCancellationTokenRuntime cancellationTokenRuntime, IOptions <SchedulingOptions> schedulerOptions, ApplicationRequestsStatisticsGroup appRequestStatistics, MessagingTrace messagingTrace) { this.ServiceProvider = serviceProvider; this.MySilo = siloDetails.SiloAddress; this.disposables = new List <IDisposable>(); this.callbacks = new ConcurrentDictionary <CorrelationId, CallbackData>(); this.typeManager = typeManager; this.messageFactory = messageFactory; this.transactionAgent = transactionAgent; this.Scheduler = scheduler; this.ConcreteGrainFactory = new GrainFactory(this, typeMetadataCache); this.logger = loggerFactory.CreateLogger <InsideRuntimeClient>(); this.invokeExceptionLogger = loggerFactory.CreateLogger($"{typeof(Grain).FullName}.InvokeException"); this.loggerFactory = loggerFactory; this.messagingOptions = messagingOptions.Value; this.cancellationTokenRuntime = cancellationTokenRuntime; this.appRequestStatistics = appRequestStatistics; this.messagingTrace = messagingTrace; this.schedulingOptions = schedulerOptions.Value; this.sharedCallbackData = new SharedCallbackData( msg => this.UnregisterCallback(msg.Id), this.loggerFactory.CreateLogger <CallbackData>(), this.messagingOptions, this.appRequestStatistics, this.messagingOptions.ResponseTimeout); this.systemSharedCallbackData = new SharedCallbackData( msg => this.UnregisterCallback(msg.Id), this.loggerFactory.CreateLogger <CallbackData>(), this.messagingOptions, this.appRequestStatistics, this.messagingOptions.SystemResponseTimeout); }
public InsideRuntimeClient( ILocalSiloDetails siloDetails, OrleansTaskScheduler scheduler, IServiceProvider serviceProvider, MessageFactory messageFactory, ITransactionAgent transactionAgent, ILoggerFactory loggerFactory, IOptions <SiloMessagingOptions> messagingOptions, ApplicationRequestsStatisticsGroup appRequestStatistics, MessagingTrace messagingTrace, GrainReferenceActivator referenceActivator, GrainInterfaceTypeResolver interfaceIdResolver, GrainInterfaceTypeToGrainTypeResolver interfaceToTypeResolver, ImrGrainMethodInvokerProvider invokers) { this.ServiceProvider = serviceProvider; this.MySilo = siloDetails.SiloAddress; this.disposables = new List <IDisposable>(); this.callbacks = new ConcurrentDictionary <CorrelationId, CallbackData>(); this.messageFactory = messageFactory; this.transactionAgent = transactionAgent; this.Scheduler = scheduler; this.ConcreteGrainFactory = new GrainFactory(this, referenceActivator, interfaceIdResolver, interfaceToTypeResolver, invokers); this.logger = loggerFactory.CreateLogger <InsideRuntimeClient>(); this.invokeExceptionLogger = loggerFactory.CreateLogger($"{typeof(Grain).FullName}.InvokeException"); this.loggerFactory = loggerFactory; this.messagingOptions = messagingOptions.Value; this.appRequestStatistics = appRequestStatistics; this.messagingTrace = messagingTrace; this.invokers = invokers; this.sharedCallbackData = new SharedCallbackData( msg => this.UnregisterCallback(msg.Id), this.loggerFactory.CreateLogger <CallbackData>(), this.messagingOptions, this.appRequestStatistics, this.messagingOptions.ResponseTimeout); this.systemSharedCallbackData = new SharedCallbackData( msg => this.UnregisterCallback(msg.Id), this.loggerFactory.CreateLogger <CallbackData>(), this.messagingOptions, this.appRequestStatistics, this.messagingOptions.SystemResponseTimeout); }
public MessageFactory(SerializationManager serializationManager, ILogger <MessageFactory> logger, MessagingTrace messagingTrace) { this.serializationManager = serializationManager; this.logger = logger; this.messagingTrace = messagingTrace; }
public MessageFactory(DeepCopier deepCopier, ILogger <MessageFactory> logger, MessagingTrace messagingTrace) { this.deepCopier = deepCopier; this.logger = logger; this.messagingTrace = messagingTrace; }