Example #1
0
 public Server()
 {
     tupleSpaceLock = new ReaderWriterLockSlim();
     prepareRemoting(defaultPort, defaultname, defaultDelay, defaultDelay);
     fd         = new FailureDetector(url);
     tupleSpace = fd.updateTS();
 }
Example #2
0
 public void Unfreeze()
 {
     Console.WriteLine("Unfreezing...");
     lock (this) {
         Monitor.PulseAll(this);
     }
     frozen     = false;
     tupleSpace = fd.updateTS();
 }
Example #3
0
        public Server(string URL, string min_delay, string max_delay)
        {
            url = URL;
            string[] urlSplit = URL.Split(new Char[] { '/', ':' }, StringSplitOptions.RemoveEmptyEntries);
            int      port, imin_delay, imax_delay;

            Int32.TryParse(urlSplit[2], out port);
            Int32.TryParse(min_delay, out imin_delay);
            Int32.TryParse(max_delay, out imax_delay);

            prepareRemoting(port, urlSplit[3], imin_delay, imax_delay);
            fd = new FailureDetector(url);
            Console.WriteLine("Hello! I'm a Server at port " + urlSplit[2]);
            tupleSpace = fd.updateTS();
        }