Ejemplo n.º 1
0
        public void setUpServer(String name)
        {
            _name = name; // secondary or primary

            if (name == "secondary") {
                _imAlive = null; // force it to be null

                _otherServerUrl = _rMasterServer.getPrimary(_url); //url do primary server
                RemoteServer otherServer = (RemoteServer)Activator.GetObject(
                typeof(RemoteServer),
                _otherServerUrl);

                _checkLife = new CheckPrimaryLife(false, 2000, _otherServerUrl);
                _checkLife.setSecondaryUrl(_url);

                padintList = otherServer.updateReq(_url); //update his padint list, send secondaryserver url to start imalives
                _checkLife.start();
            }
        }
Ejemplo n.º 2
0
        //private List<Requests> _rq;
        public Dictionary<int, PadInt> updateReq(String url)
        {
            _otherServerUrl = url; //secondary server url
            _checkLife = null; //force it to be null

            _imAlive = new ImAlive(2000, _otherServerUrl);
            _imAlive.start();

            return padintList;
        }
Ejemplo n.º 3
0
 public void setCheckPrimaryLife(CheckPrimaryLife c)
 {
     _checkLife = c;
 }