Ejemplo 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 + "!");
     }
 }
Ejemplo n.º 2
0
 public WorkerRegister()
 {
     wm = new WorkerManager();
 }
Ejemplo n.º 3
0
        public bool registerWorker(string url)
        {
            bool success = WorkerManager.addServer(url);

            return(success);
        }
Ejemplo n.º 4
0
 public bool recover(string url)
 {
     return(WorkerManager.recover(url));
 }
Ejemplo n.º 5
0
 public void status()
 {
     WorkerManager.status();
 }
Ejemplo n.º 6
0
 public bool fail(string url)
 {
     return(WorkerManager.fail(url));
 }
Ejemplo n.º 7
0
 // Freezes from the library. The master manages this situation
 public bool freeze(string url)
 {
     return(WorkerManager.freeze(url));
 }
Ejemplo n.º 8
0
 public string getSucessorURL(int id)
 {
     return(WorkerManager.getWorkerSucessor(id));
 }
Ejemplo 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));
 }
Ejemplo n.º 10
0
        public IDictionary <int, string> updateCache()
        {
            IDictionary <int, string> servers = WorkerManager.getAvailableServers();

            return(servers);
        }