public DistributedActorTableContainer(string name, IActorRef clusterActorDiscovery, Type actorFactoryType, object[] actorFactoryInitalizeArgs, object downMessage = null) { _name = name; _clusterActorDiscovery = clusterActorDiscovery; _downMessage = downMessage; _log = Context.GetLogger(); if (actorFactoryType != null) { try { _actorFactory = (IActorFactory)Activator.CreateInstance(actorFactoryType); _actorFactory.Initialize(actorFactoryInitalizeArgs); } catch (Exception e) { _log.Error(e, $"Exception in initializing ${actorFactoryType.FullName}"); _actorFactory = null; } } Receive <ClusterActorDiscoveryMessage.ActorUp>(m => Handle(m)); Receive <ClusterActorDiscoveryMessage.ActorDown>(m => Handle(m)); Receive <DistributedActorTableMessage <TKey> .Add>(m => Handle(m)); Receive <DistributedActorTableMessage <TKey> .Remove>(m => Handle(m)); Receive <DistributedActorTableMessage <TKey> .Internal.Create>(m => Handle(m)); Receive <DistributedActorTableMessage <TKey> .Internal.AddReply>(m => Handle(m)); Receive <DistributedActorTableMessage <TKey> .Internal.GracefulStop>(m => Handle(m)); Receive <Terminated>(m => Handle(m)); }