Beispiel #1
0
        public GrainTypeManager(
            ILocalSiloDetails siloDetails,
            IApplicationPartManager applicationPartManager,
            DefaultPlacementStrategy defaultPlacementStrategy,
            SerializationManager serializationManager,
            MultiClusterRegistrationStrategyManager multiClusterRegistrationStrategyManager,
            ILogger <GrainTypeManager> logger,
            IOptions <GrainClassOptions> grainClassOptions)
        {
            var localTestMode = siloDetails.SiloAddress.Endpoint.Address.Equals(IPAddress.Loopback);

            this.logger = logger;
            this.defaultPlacementStrategy = defaultPlacementStrategy.PlacementStrategy;
            this.serializationManager     = serializationManager;
            this.multiClusterRegistrationStrategyManager = multiClusterRegistrationStrategyManager;
            grainInterfaceMap        = new GrainInterfaceMap(localTestMode, this.defaultPlacementStrategy);
            ClusterGrainInterfaceMap = grainInterfaceMap;
            grainInterfaceMapsBySilo = new Dictionary <SiloAddress, GrainInterfaceMap>();

            var grainClassFeature = applicationPartManager.CreateAndPopulateFeature <GrainClassFeature>();

            this.grainTypes = CreateGrainTypeMap(grainClassFeature, grainClassOptions.Value);

            var grainInterfaceFeature = applicationPartManager.CreateAndPopulateFeature <GrainInterfaceFeature>();

            this.invokers = CreateInvokerMap(grainInterfaceFeature);
            this.InitializeInterfaceMap();
        }
Beispiel #2
0
 public GrainTypeManager(bool localTestMode, SiloAssemblyLoader loader, DefaultPlacementStrategy defaultPlacementStrategy, SerializationManager serializationManager, MultiClusterRegistrationStrategyManager multiClusterRegistrationStrategyManager)
 {
     this.defaultPlacementStrategy = defaultPlacementStrategy.PlacementStrategy;
     this.loader = loader;
     this.serializationManager = serializationManager;
     this.multiClusterRegistrationStrategyManager = multiClusterRegistrationStrategyManager;
     grainInterfaceMap        = new GrainInterfaceMap(localTestMode, this.defaultPlacementStrategy);
     ClusterGrainInterfaceMap = grainInterfaceMap;
     grainInterfaceMapsBySilo = new Dictionary <SiloAddress, GrainInterfaceMap>();
 }
Beispiel #3
0
 public GrainTypeManager(bool localTestMode, SiloAssemblyLoader loader, DefaultPlacementStrategy defaultPlacementStrategy)
 {
     this.defaultPlacementStrategy = defaultPlacementStrategy.PlacementStrategy;
     this.loader = loader;
     grainInterfaceMap = new GrainInterfaceMap(localTestMode, this.defaultPlacementStrategy);
     lock (lockable)
     {
         if (Instance != null)
             throw new InvalidOperationException("An attempt to create a second insance of GrainTypeManager.");
         Instance = this;
     }
 }
Beispiel #4
0
 public GrainTypeManager(bool localTestMode, SiloAssemblyLoader loader, DefaultPlacementStrategy defaultPlacementStrategy)
 {
     this.defaultPlacementStrategy = defaultPlacementStrategy.PlacementStrategy;
     this.loader       = loader;
     grainInterfaceMap = new GrainInterfaceMap(localTestMode, this.defaultPlacementStrategy);
     lock (lockable)
     {
         if (Instance != null)
         {
             throw new InvalidOperationException("An attempt to create a second insance of GrainTypeManager.");
         }
         Instance = this;
     }
 }
 public GrainTypeManager(bool localTestMode, SiloAssemblyLoader loader, DefaultPlacementStrategy defaultPlacementStrategy, SerializationManager serializationManager)
 {
     this.defaultPlacementStrategy = defaultPlacementStrategy.PlacementStrategy;
     this.loader = loader;
     this.serializationManager = serializationManager;
     grainInterfaceMap         = new GrainInterfaceMap(localTestMode, this.defaultPlacementStrategy);
     ClusterGrainInterfaceMap  = grainInterfaceMap;
     grainInterfaceMapsBySilo  = new Dictionary <SiloAddress, GrainInterfaceMap>();
     lock (lockable)
     {
         if (Instance != null)
         {
             throw new InvalidOperationException("An attempt to create a second insance of GrainTypeManager.");
         }
         Instance = this;
     }
 }
Beispiel #6
0
        public GrainTypeManager(ILocalSiloDetails siloDetails, SiloAssemblyLoader loader, DefaultPlacementStrategy defaultPlacementStrategy, SerializationManager serializationManager, MultiClusterRegistrationStrategyManager multiClusterRegistrationStrategyManager)
        {
            var localTestMode = siloDetails.SiloAddress.Endpoint.Address.Equals(IPAddress.Loopback);

            this.defaultPlacementStrategy = defaultPlacementStrategy.PlacementStrategy;
            this.loader = loader;
            this.serializationManager = serializationManager;
            this.multiClusterRegistrationStrategyManager = multiClusterRegistrationStrategyManager;
            grainInterfaceMap        = new GrainInterfaceMap(localTestMode, this.defaultPlacementStrategy);
            ClusterGrainInterfaceMap = grainInterfaceMap;
            grainInterfaceMapsBySilo = new Dictionary <SiloAddress, GrainInterfaceMap>();
        }
Beispiel #7
0
 public GrainTypeManager(ILocalSiloDetails siloDetails, SiloAssemblyLoader loader, DefaultPlacementStrategy defaultPlacementStrategy, SerializationManager serializationManager, MultiClusterRegistrationStrategyManager multiClusterRegistrationStrategyManager)
     : this(siloDetails.SiloAddress.Endpoint.Address.Equals(IPAddress.Loopback), loader, defaultPlacementStrategy, serializationManager, multiClusterRegistrationStrategyManager)
 {
 }
Beispiel #8
0
 public GrainTypeManager(SiloInitializationParameters silo, SiloAssemblyLoader loader, DefaultPlacementStrategy defaultPlacementStrategy)
     : this(silo.SiloAddress.Endpoint.Address.Equals(IPAddress.Loopback), loader, defaultPlacementStrategy)
 {
 }
Beispiel #9
0
        public GrainTypeManager(SiloInitializationParameters silo, SiloAssemblyLoader loader, DefaultPlacementStrategy defaultPlacementStrategy)
        {
            var localTestMode = silo.SiloAddress.Endpoint.Address.Equals(IPAddress.Loopback);

            this.defaultPlacementStrategy = defaultPlacementStrategy.PlacementStrategy;
            this.loader              = loader;
            grainInterfaceMap        = new GrainInterfaceMap(localTestMode, this.defaultPlacementStrategy);
            ClusterGrainInterfaceMap = grainInterfaceMap;
            grainInterfaceMapsBySilo = new Dictionary <SiloAddress, GrainInterfaceMap>();
            lock (lockable)
            {
                if (Instance != null)
                {
                    throw new InvalidOperationException("An attempt to create a second insance of GrainTypeManager.");
                }
                Instance = this;
            }
        }
Beispiel #10
0
 public GrainTypeManager(SiloInitializationParameters silo, SiloAssemblyLoader loader, DefaultPlacementStrategy defaultPlacementStrategy)
     : this(silo.SiloAddress.Endpoint.Address.Equals(IPAddress.Loopback), loader, defaultPlacementStrategy)
 {
 }