Exemple #1
0
		public object Clone()
		{
			ServerNode node = new ServerNode();
			node.InProcInstance = this.InProcInstance;
			node.IsReplica = this.IsReplica;
            node.NodeAt = this.NodeAt;
			node.Name = this.Name;
			node.Address = this.Address != null ? (Address)this.Address : null;

			return node;
		}
Exemple #2
0
        public Node[] GetCacheServers(string cacheId)
        {
            if (cacheId == null)
                throw new ArgumentNullException("cacheId");

            List<Node> serverNodes = new List<Node>();
            try
            {
                _rwLock.AcquireReaderLock(Timeout.Infinite);

                if (s_caches.Contains(cacheId.ToLower()))
                {
                    CacheInfo cacheInfo = s_caches[cacheId.ToLower()] as CacheInfo;
                    if (cacheInfo.CacheProps.CacheType == "clustered-cache")
                    {
                        List<Address> nodeAddresses = cacheInfo.CacheProps.Cluster.GetAllConfiguredNodes();
                       ServerNode server = null;
                        foreach (Address node in nodeAddresses)
                        {
                            server = new ServerNode();
                            server.Address = node;
                            serverNodes.Add(server);
                        }
                    }
                }
            }
            finally
            {
                _rwLock.ReleaseReaderLock();
            }
            return serverNodes.ToArray();
        }
Exemple #3
0
 public CacheNodeStatistics(ServerNode node)
 {
     _node = node;
 }