public Set(Namespace parent, String info) { this.parent = parent; Info(info); }
public void RefreshNamespaceData(Node node, Namespace ns) { /* * refresh namespace data */ try { String nameSpaceString = Info.Request (infoPolicy, node, "namespace/" + ns); ns.MergeNamespaceInfo (nameSpaceString); String setsString = Info.Request (infoPolicy, node, "sets/" + ns); if (setsString.Length > 0) { String[] sets = setsString.Split (';'); foreach (String setData in sets) { ns.MergeSet (setData); } } } catch (AerospikeException e) { log.Error ("Error geting Namespace details", e); } }
public void RefreshNamespaces() { /* * cache namespaces */ if (this.namespaceCache == null) { this.namespaceCache = new SortedDictionary<String, Namespace> (); foreach (Node node in client.Nodes) { try { String namespaceString = Info.Request (InfoPolicy, node, "namespaces"); if (namespaceString.Trim ().Length > 0) { String[] namespaceList = namespaceString.Split (';'); foreach (string nss in namespaceList) { Namespace ns = null; if (!this.namespaceCache.TryGetValue(nss, out ns)) { ns = new Namespace (nss); this.namespaceCache.Add(nss, ns); } RefreshNamespaceData (node, ns); } } } catch (AerospikeException e) { log.Error (String.Format ("Error geting Namespaces, Result code {0}, Message: {1} ", e.Message, e.Result)); } } } }