Ejemplo n.º 1
0
        public SimulationManager(
            ISimulationContext simulationContext,
            IDevicePartitions devicePartitions,
            IClusterNodes clusterNodes,
            IDeviceModels deviceModels,
            IFactory factory,
            IClusteringConfig clusteringConfig,
            ILogger logger,
            IInstance instance,
            ISimulationStatistics simulationStatistics,
            ISimulations simulations)
        {
            this.simulationContext    = simulationContext;
            this.devicePartitions     = devicePartitions;
            this.clusterNodes         = clusterNodes;
            this.deviceModels         = deviceModels;
            this.simulationStatistics = simulationStatistics;
            this.factory          = factory;
            this.log              = logger;
            this.instance         = instance;
            this.maxDevicePerNode = clusteringConfig.MaxDevicesPerNode;
            this.simulations      = simulations;

            this.assignedPartitions = new ConcurrentDictionary <string, DevicesPartition>();
            this.nodeCount          = 1;
            this.deviceCount        = 0;
        }
Ejemplo n.º 2
0
 public Agent(
     IClusterNodes clusterNodes,
     IDevicePartitions partitions,
     ISimulations simulations,
     IThreadWrapper thread,
     IClusteringConfig clusteringConfig,
     ILogger logger)
 {
     this.clusterNodes       = clusterNodes;
     this.partitions         = partitions;
     this.simulations        = simulations;
     this.thread             = thread;
     this.log                = logger;
     this.checkIntervalMsecs = clusteringConfig.CheckIntervalMsecs;
     this.running            = false;
 }
Ejemplo n.º 3
0
 public Agent(
     IClusterNodes clusterNodes,
     IDevicePartitions partitions,
     ISimulations simulations,
     IThreadWrapper thread,
     IClusteringConfig clusteringConfig,
     IFactory factory,
     ILogger logger,
     IAzureManagementAdapterClient azureManagementAdapter)
 {
     this.clusterNodes           = clusterNodes;
     this.partitions             = partitions;
     this.simulations            = simulations;
     this.thread                 = thread;
     this.factory                = factory;
     this.log                    = logger;
     this.azureManagementAdapter = azureManagementAdapter;
     this.clusteringConfig       = clusteringConfig;
     this.checkIntervalMsecs     = clusteringConfig.CheckIntervalMsecs;
     this.running                = false;
     this.currentNodeCount       = DEFAULT_NODE_COUNT;
 }