gov.va.medora.mdo.dao.MultiSourceQuery.disconnect C# (CSharp) Method

disconnect() public method

public disconnect ( ) : IndexedHashtable
return IndexedHashtable
        public IndexedHashtable disconnect()
        {
            int lth = cxnTable.Count;
            QueryThread[] queries = new QueryThread[lth];
            Thread[] threads = new Thread[lth];
            for (int i = 0; i < lth; i++)
            {
                queries[i] = new QueryThread(cxnTable.GetValue(i), "disconnect", new Object[0]);
                threads[i] = new Thread(new ThreadStart(queries[i].execute));
                threads[i].Start();
            }
            IndexedHashtable result = new IndexedHashtable(lth);
            for (int i = 0; i < lth; i++)
            {
                string key = (string)cxnTable.GetKey(i);
                threads[i].Join();
                if (queries[i].isExceptionResult())
                {
                    result.Add(key, queries[i].Result);
                }
                else
                {
                    result.Add(key, "OK");
                }
            }
            cxnTable.Clear();
            return result;
        }