for more information on underlying calls, see http://www.hardhats.org/fileman/pm/dba_frm.htm
상속: IToolsDao
예제 #1
0
파일: ToolsApi.cs 프로젝트: OSEHRA/mdo
 public string[] ddrLister(
     AbstractConnection cxn,
     string file,
     string iens,
     string flds,
     string flags,
     string maxRex,
     string from,
     string part,
     string xref,
     string screen,
     string identifier)
 {
     VistaToolsDao dao = new VistaToolsDao(cxn);
     return dao.ddrLister(file, iens, flds, flags, maxRex, from, part, xref, screen, identifier);
 }
예제 #2
0
        internal void heartbeat()
        {
            Dictionary<string, List<AbstractConnection>> cxnsToRemove = new Dictionary<string, List<AbstractConnection>>();

            foreach (string site in _connections.Keys)
            {
                foreach (AbstractConnection cxn in _connections[site])
                {
                    if (DateTime.Now.Subtract(cxn.LastQueryTimestamp).Seconds > _cxnRefreshTime)
                    {
                        try
                        {
                            VistaToolsDao dao = new VistaToolsDao(cxn);
                            dao.getTimestamp();
                        }
                        catch (Exception)
                        {
                            if (!cxnsToRemove.ContainsKey(site))
                            {
                                cxnsToRemove.Add(site, new List<AbstractConnection>());
                            }
                            cxnsToRemove[site].Add(cxn);
                        }
                    }
                }
            }

            if (cxnsToRemove.Count > 0)
            {
                foreach (string site in cxnsToRemove.Keys)
                {
                    foreach (AbstractConnection cxn in cxnsToRemove[site])
                    {
                        _connections[site].Remove(cxn);
                        _currentActiveConnections--;
                    }
                }
            }
        }
예제 #3
0
 /// <summary>
 /// This function should locate a connection marked as available, verify the connection
 /// is still active (using a simple getTimestamp query), re-allocate any encountered failed
 /// connections out of process, and return the first connection that is available and connected
 /// </summary>
 /// <param name="siteId"></param>
 /// <returns></returns>
 internal AbstractConnection getAvailableConnection(string siteId)
 {
     lock (_connections)
     {
         if (_connections.ContainsKey(siteId) && _connections[siteId].Count > 0)
         {
             foreach (AbstractConnection cxn in _connections[siteId])
             {
                 if (cxn.IsAvailable)
                 {
                     VistaToolsDao dao = new VistaToolsDao(cxn);
                     try
                     {
                         dao.getTimestamp();
                         cxn.IsAvailable = false;
                         return cxn;
                     }
                     catch (Exception)
                     {
                         _currentActiveConnections--;
                         cxn.IsAvailable = false;
                         reallocateConnection(cxn);
                     }
                 }
             }
         }
     }
     return null;
 }
예제 #4
0
파일: ToolsApi.cs 프로젝트: OSEHRA/mdo
 public string getRpcName(AbstractConnection cxn, string rpcIEN)
 {
     VistaToolsDao dao = new VistaToolsDao(cxn);
     return dao.getRpcName(rpcIEN);
 }
예제 #5
0
파일: ToolsApi.cs 프로젝트: OSEHRA/mdo
 public KeyValuePair<string, string>[] getRpcList(AbstractConnection cxn, string target)
 {
     VistaToolsDao dao = new VistaToolsDao(cxn);
     return dao.getRpcList(target);
 }
예제 #6
0
파일: ToolsApi.cs 프로젝트: OSEHRA/mdo
 public string[] ddrGetsEntry(AbstractConnection cxn, string file, string iens, string flds, string flags)
 {
     VistaToolsDao dao = new VistaToolsDao(cxn);
     return dao.ddrGetsEntry(file, iens, flds, flags);
 }
예제 #7
0
파일: ToolsApi.cs 프로젝트: OSEHRA/mdo
 //public bool hasPatch(AbstractConnection cxn, string patchId)
 //{
 //}
 public string runRpc(AbstractConnection cxn, string rpcName, string[] paramValues, int[] paramTypes, bool[] paramEncrypted)
 {
     VistaToolsDao dao = new VistaToolsDao(cxn);
     return dao.runRpc(rpcName, paramValues, paramTypes, paramEncrypted);
 }
예제 #8
0
파일: ToolsApi.cs 프로젝트: OSEHRA/mdo
 public bool isRpcAvailableAtSite(AbstractConnection cxn, string target, string localRemote, string version)
 {
     VistaToolsDao dao = new VistaToolsDao(cxn);
     return dao.isRpcAvailableAtSite(target, localRemote, version);
 }
예제 #9
0
파일: ToolsApi.cs 프로젝트: OSEHRA/mdo
 public string isRpcAvailable(AbstractConnection cxn, string target, string context)
 {
     VistaToolsDao dao = new VistaToolsDao(cxn);
     return dao.isRpcAvailable(target, context);
 }
예제 #10
0
파일: ToolsApi.cs 프로젝트: OSEHRA/mdo
 public string getVariableValue(AbstractConnection cxn, string arg)
 {
     VistaToolsDao dao = new VistaToolsDao(cxn);
     return dao.getVariableValue(arg);
 }