Esempio n. 1
0
        public void InitTracker(LoggerWrapper logger)
        {
            this.logger = logger;

            jobTrackerThread = new Thread(new ThreadStart(TrackerJob));
            jobTrackerThread.Start();
        }
        public WorkerService(IWorker worker)
        {
            this.worker = worker;
            this.id = worker.GetId();

            manager = new WorkersManager();
            manager.AddOverseenWorker(new OverseenWorker(this, null)); // Adds himself as an available worker

            logger = new LoggerWrapper("WS" + id);
            logger.Log("Created a new WorkerService");
        }
 public PuppetMasterService(IPuppetMaster puppetMaster)
 {
     this.puppetMaster = puppetMaster;
     this.logger = puppetMaster.GetLogger();
     workers = new List<IWorker>();
 }
 public PuppetMaster(string name)
 {
     logger = new LoggerWrapper(name);
 }
Esempio n. 5
0
        public void InitWorker() {
            logger = new LoggerWrapper("W" + id);

            Regex regex = RegexConstants.PATTERN_PORT;
            var v = regex.Match(serviceURL);
            port = int.Parse(v.Groups[1].ToString());

            context = new workerContext(new Object());

            setupService();

            // Notify Master Tracker that I'm a new worker
            if (entryURL != null) {
                notifyMasterTracker(entryURL);
            }
        }
Esempio n. 6
0
 private Factory()
 {
     logger = new LoggerWrapper("SERVICE-FACTORY");
 }