public AuctionManagement(NetworkInterfaceCard communicationModule,
                          IMachinePowerController powerController,
                          UtilizationTable holder, TestedHosts testedHosts)
     : base(communicationModule, powerController, holder)
 {
     TestedHostsCount = testedHosts;
 }
        public MasterMachine(NetworkSwitch networkSwitch, IMachinePowerController powerController,
                             UtilizationTable holder, Strategies strategy, AuctionTypes pushAuctionType, AuctionTypes pullAuctionType,
                             SchedulingAlgorithm scheduling,
                             TestedHosts testedHosts)
            : base(0, networkSwitch)
        {
            switch (strategy)
            {
            case Strategies.WAshraf2017Auction:
                _handler = new AuctionManagement(CommunicationModule, powerController, holder, testedHosts);
                break;

            case Strategies.WAshraf2017:
                _handler = new InorderPropingManagement(CommunicationModule, powerController, holder);
                break;

            case Strategies.Zhao:
                _handler = new NoMasterHandlerModule(CommunicationModule);
                break;

            case Strategies.ForsmanPush:
                _handler = new NoMasterHandlerModule(CommunicationModule);
                break;

            case Strategies.ForsmanPull:
                _handler = new NoMasterHandlerModule(CommunicationModule);
                break;

            case Strategies.Proposed2018:

                _handler = new ProposedMasterHandler(CommunicationModule, powerController, holder, testedHosts, pushAuctionType, pullAuctionType);
                break;

            default:

                throw new ArgumentOutOfRangeException(nameof(strategy), strategy, null);
            }

            Holder = holder;
            //StartMachine();
            switch (scheduling)
            {
            case SchedulingAlgorithm.FF:
                scheduler = new FirstFitScheduler(holder, CommunicationModule, powerController);
                break;

            case SchedulingAlgorithm.MFull:
            case SchedulingAlgorithm.LFull:
                scheduler = new AuctionScheduler(holder, CommunicationModule, powerController, scheduling);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(scheduling), scheduling, null);
            }
        }
Exemplo n.º 3
0
 public ProposedMasterHandler(NetworkInterfaceCard communicationModule,
                              IMachinePowerController powerController,
                              UtilizationTable dataHolder,
                              TestedHosts testedHosts, AuctionTypes pushAuctionType, AuctionTypes pullAuctionType) : base(communicationModule)
 {
     PowerController  = powerController;
     DataHolder       = dataHolder;
     TestedHostsCount = testedHosts;
     PushAuctionType  = pushAuctionType;
     PullAuctionType  = pullAuctionType;
 }
Exemplo n.º 4
0
 public MineCommon(NetworkInterfaceCard communicationModule, IMachinePowerController powerController, UtilizationTable dataHolder) : base(communicationModule)
 {
     PowerController = powerController;
     DataHolder      = dataHolder;
 }
 public AuctionScheduler(UtilizationTable holder, NetworkInterfaceCard communicationModule, IMachinePowerController powerContoller, SchedulingAlgorithm schedulingAlgorithm) : base(holder, communicationModule, powerContoller)
 {
     this.schedulingAlgorithm = schedulingAlgorithm;
 }
Exemplo n.º 6
0
 public FirstFitScheduler(UtilizationTable holder,
                          NetworkInterfaceCard communicationModule,
                          IMachinePowerController powerContoller) : base(holder, communicationModule, powerContoller)
 {
 }
 public InorderPropingManagement(NetworkInterfaceCard nic,
                                 IMachinePowerController powerController,
                                 UtilizationTable holder)
     : base(nic, powerController, holder)
 {
 }
Exemplo n.º 8
0
 public BaseScheduler(UtilizationTable holder, NetworkInterfaceCard communicationModule, IMachinePowerController powerContoller)
 {
     Holder = holder;
     this.CommunicationModule = communicationModule;
     this.powerContoller      = powerContoller;
 }