Esempio n. 1
0
 // If received, resets the timer for the worker
 internal static void IAmAlive(String worker_url)
 {
     if (!WorkerManager.isFailedServer(worker_url))
     {
         Console.WriteLine("I Am ALIVE " + worker_url + "!");
         resetTimer(_timerServers[worker_url]);
     }
     else
     {
         // If the worker_url is not in the heartbeat servers it means
         // that it came back from failure
         Console.WriteLine("CAME BACK FROM FAILURE " + worker_url + "!");
     }
 }
Esempio n. 2
0
 public WorkerRegister()
 {
     wm = new WorkerManager();
 }
Esempio n. 3
0
        public bool registerWorker(string url)
        {
            bool success = WorkerManager.addServer(url);

            return(success);
        }
Esempio n. 4
0
 public bool recover(string url)
 {
     return(WorkerManager.recover(url));
 }
Esempio n. 5
0
 public void status()
 {
     WorkerManager.status();
 }
Esempio n. 6
0
 public bool fail(string url)
 {
     return(WorkerManager.fail(url));
 }
Esempio n. 7
0
 // Freezes from the library. The master manages this situation
 public bool freeze(string url)
 {
     return(WorkerManager.freeze(url));
 }
Esempio n. 8
0
 public string getSucessorURL(int id)
 {
     return(WorkerManager.getWorkerSucessor(id));
 }
Esempio n. 9
0
 // Sets the server with the specified url with a failed state
 public string setFailedServer(string failed_url)
 {
     Console.WriteLine("Setting failed server : " + failed_url);
     return(WorkerManager.setFailedServer(failed_url));
 }
Esempio n. 10
0
        public IDictionary <int, string> updateCache()
        {
            IDictionary <int, string> servers = WorkerManager.getAvailableServers();

            return(servers);
        }