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

            jobTrackerThread = new Thread(new ThreadStart(TrackerJob));
            jobTrackerThread.Start();
        }
Exemplo n.º 2
0
        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>();
 }
Exemplo n.º 4
0
 public PuppetMaster(string name)
 {
     logger = new LoggerWrapper(name);
 }
Exemplo 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);
            }
        }
Exemplo n.º 6
0
 private Factory()
 {
     logger = new LoggerWrapper("SERVICE-FACTORY");
 }