internal ActorManager( ActorRegistration registration, ActorActivator activator, JsonSerializerOptions jsonSerializerOptions, ILoggerFactory loggerFactory, IActorProxyFactory proxyFactory, IDaprInteractor daprInteractor) { this.registration = registration; this.activator = activator; this.jsonSerializerOptions = jsonSerializerOptions; this.loggerFactory = loggerFactory; this.proxyFactory = proxyFactory; this.daprInteractor = daprInteractor; this.timerManager = new DefaultActorTimerManager(this.daprInteractor); // map for remoting calls. this.methodDispatcherMap = new ActorMethodDispatcherMap(this.registration.Type.InterfaceTypes); // map for non-remoting calls. this.actorMethodInfoMap = new ActorMethodInfoMap(this.registration.Type.InterfaceTypes); this.activeActors = new ConcurrentDictionary <ActorId, ActorActivatorState>(); this.reminderMethodContext = ActorMethodContext.CreateForReminder(ReceiveReminderMethodName); this.timerMethodContext = ActorMethodContext.CreateForTimer(TimerMethodName); this.serializersManager = IntializeSerializationManager(null); this.messageBodyFactory = new WrappedRequestMessageFactory(); this.logger = loggerFactory.CreateLogger(this.GetType()); }
public ActorRemotingClient( IDaprInteractor daprInteractor, IActorMessageBodySerializationProvider serializationProvider = null) { this.daprInteractor = daprInteractor; this.serializersManager = IntializeSerializationManager(serializationProvider); this.remotingMessageBodyFactory = this.serializersManager.GetSerializationProvider().CreateMessageBodyFactory(); }
/// <summary> /// Initializes a new instance of the <see cref="ActorHost"/> class. /// </summary> /// <param name="actorTypeInfo">The type information of the Actor.</param> /// <param name="id">The id of the Actor instance.</param> /// <param name="jsonSerializerOptions">The <see cref="JsonSerializerOptions"/> to use for actor state persistence and message deserialization.</param> /// <param name="loggerFactory">The logger factory.</param> /// <param name="proxyFactory">The <see cref="ActorProxyFactory" />.</param> /// <param name="daprInteractor">The <see cref="IDaprInteractor" />.</param> internal ActorHost( ActorTypeInformation actorTypeInfo, ActorId id, JsonSerializerOptions jsonSerializerOptions, ILoggerFactory loggerFactory, IActorProxyFactory proxyFactory, IDaprInteractor daprInteractor) { this.ActorTypeInfo = actorTypeInfo; this.Id = id; this.LoggerFactory = loggerFactory; this.ProxyFactory = proxyFactory; this.DaprInteractor = daprInteractor; this.StateProvider = new DaprStateProvider(this.DaprInteractor, jsonSerializerOptions); }
/// <summary> /// Initializes a new instance of the <see cref="ActorProxyFactory"/> class. /// TODO: Accept Retry settings. /// </summary> public ActorProxyFactory() { // TODO: Allow configuration of serialization and client settings. this.daprInteractor = new DaprHttpInteractor(); }
public ActorNonRemotingClient(IDaprInteractor daprInteractor) { this.daprInteractor = daprInteractor; }
public DefaultActorTimerManager(IDaprInteractor interactor) { this.interactor = interactor; }
public DaprStateProvider(IDaprInteractor daprInteractor, JsonSerializerOptions jsonSerializerOptions = null) { this.jsonSerializerOptions = jsonSerializerOptions; this.daprInteractor = daprInteractor; }
public DaprStateProvider(IDaprInteractor daprInteractor, IActorStateSerializer actorStateSerializer = null) { this.actorStateSerializer = actorStateSerializer; this.daprInteractor = daprInteractor; }