public void fullReplication(ReplicatedInfo replicatedInfo)
        {
            this.replicatedInfo = replicatedInfo;

            if (!beating)
            {
                Console.WriteLine("I AM NOW SECONDARY URAYYY");
                lastPrimaryHeartBeat = DateTime.Now;
                // start heartbeats
                heartbeatDelegate del = new heartbeatDelegate(heartbeat);
                del.BeginInvoke(null, null);
                beating = true;
            }
        }
        public WorkerJobTracker(int id, string serviceURL, TcpChannel clientChannel)
        {
            this.id         = id;
            this.serviceURL = serviceURL;
            this.JTURL      = serviceURL;
            this.isJT       = true;
            this.tcpChannel = clientChannel;

            replicatedInfo = new ReplicatedInfo();

            replicatedInfo.workers = new Dictionary <int, string>();

            jobTracker = (IWorkerJobTracker)Activator.GetObject(
                typeof(IWorkerJobTracker), serviceURL);


            addWorker(id, serviceURL);

            heartbeatDelegate del = new heartbeatDelegate(heartbeat);

            del.BeginInvoke(null, null);
        }