Esempio n. 1
0
        /*
         * Stop the underlying EdgeListener.  This is important to stop any
         * thread and resources that might be allocated by that EdgeListener.
         */
        public void Stop()
        {
            foreach (Edge e in _unannounced.Values)
            {
                try {
                    e.Close();
                } catch (Exception ex) {
                    ProtocolLog.WriteIf(ProtocolLog.Exceptions, ex.ToString());
                }
            }

            _running = false;
            if (_rrm_fe != null)
            {
                _rrm_fe.TryCancel();
            }
            if (_edge_fe != null)
            {
                _edge_fe.TryCancel();
            }
            if (_timer_thread != null)
            {
                _timer_thread.Join();
            }
            _el.Stop();
        }
Esempio n. 2
0
        /// <summary> Must stop the Recycling thread.</summary>
        public void Stop()
        {
            if (System.Threading.Interlocked.Exchange(ref _stopped, 1) == 1)
            {
                return;
            }

            _fe.TryCancel();
        }
Esempio n. 3
0
        /// <summary></summary>
        public void Stop()
        {
            if (Interlocked.Exchange(ref _stopped, 1) == 1)
            {
                return;
            }

            _sa_check.TryCancel();

            foreach (SecurityAssociation sa in _sas)
            {
                sa.Close("Shutting down...");
            }
        }
Esempio n. 4
0
        /// <summary>No more TAs are necessary.</summary>
        virtual public bool EndFindingTAs()
        {
            FuzzyEvent fe = _fe;

            if (Interlocked.Exchange(ref _running, 0) == 0)
            {
                return(false);
            }

            if (fe != null)
            {
                fe.TryCancel();
            }
            return(true);
        }
Esempio n. 5
0
        /*
         * Stop the underlying EdgeListener.  This is important to stop any
         * thread and resources that might be allocated by that EdgeListener.
         */
        public void Stop()
        {
            foreach (Edge e in _unannounced.Values)
            {
                try {
                    e.Close();
                } catch (Exception ex) {
                    Console.WriteLine(ex);
                }
            }

            _running = false;
            if (_fe != null)
            {
                _fe.TryCancel();
            }
            _el.Stop();
        }
Esempio n. 6
0
        /// <summary>All nodes are disconnected?  Stop the PathEL.</summary>
        protected virtual void StopPem(DateTime now)
        {
            ApplicationNode appnode = _app_node;
            bool            stop    = appnode == null;

            if (!stop)
            {
                stop = appnode.Node.ConState == Node.ConnectionState.Disconnected;
            }

            if (stop)
            {
                foreach (PathELManager pem in _type_to_pem.Values)
                {
                    pem.Stop();
                }
                _type_to_pem.Clear();
                _fe_stop_pem.TryCancel();
            }
        }
Esempio n. 7
0
 /// <summary>Stops the running of the job, node disconnection also calls it.</summary>
 public void Stop()
 {
     _fe.TryCancel();
 }
Esempio n. 8
0
 override public void Stop()
 {
     _check_state.TryCancel();
     base.Stop();
 }