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); }
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--; } } } }
/// <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; }
public string getRpcName(AbstractConnection cxn, string rpcIEN) { VistaToolsDao dao = new VistaToolsDao(cxn); return dao.getRpcName(rpcIEN); }
public KeyValuePair<string, string>[] getRpcList(AbstractConnection cxn, string target) { VistaToolsDao dao = new VistaToolsDao(cxn); return dao.getRpcList(target); }
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); }
//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); }
public bool isRpcAvailableAtSite(AbstractConnection cxn, string target, string localRemote, string version) { VistaToolsDao dao = new VistaToolsDao(cxn); return dao.isRpcAvailableAtSite(target, localRemote, version); }
public string isRpcAvailable(AbstractConnection cxn, string target, string context) { VistaToolsDao dao = new VistaToolsDao(cxn); return dao.isRpcAvailable(target, context); }
public string getVariableValue(AbstractConnection cxn, string arg) { VistaToolsDao dao = new VistaToolsDao(cxn); return dao.getVariableValue(arg); }