Returns the server identified by Neo4j cluster id.
@param id Neo4j cluster id
@return server identified by id
771769
public Server getServerById(final String id) {
        for (Server server : SERVERS) {
            if (server.getId().equals(id)) {
                return server;
            }
        }

        return null;
    }
903713
public static Expression id(String id) {
    CodeChunkUtils.checkId(id);
    return Leaf.create(id, /* isCheap= */ true);
  }
1232086
public InetSocketAddress remoteLookup(final Identifier id) throws Exception {
    // the lookup is not thread-safe, because concurrent replies may
    // be read by the wrong thread.
    // TODO: better fix uses a map of id's after REEF-198
    synchronized (this) {

      LOG.log(Level.INFO, "Looking up {0} on NameServer {1}", new Object[]{id, serverSocketAddr});

      final List<Identifier> ids = Arrays.asList(id);
      final Link<NamingMessage> link = transport.open(serverSocketAddr, codec,
          new LoggingLinkListener<NamingMessage>());
      link.write(new NamingLookupRequest(ids));

      final NamingLookupResponse resp;
      for (;;) {
        try {
          resp = replyQueue.poll(timeout, TimeUnit.MILLISECONDS);
          break;
        } catch (final InterruptedException e) {
          LOG.log(Level.INFO, "Lookup interrupted", e);
          throw new NamingException(e);
        }
      }

      final List<NameAssignment> list = resp == null ? Collections.<NameAssignment>emptyList()
          : resp.getNameAssignments();
      if (list.isEmpty()) {
        throw new NamingException("Cannot find " + id + " from the name server");
      } else {
        return list.get(0).getAddress();
      }
    }
  }
875521
public Entity getEntity(String id) {
        Entity e = getEntities().get(id);
        if (e == null) {
            return null;
        }
        return e;
    }
572350
public OvhModuleList moduleList_id_GET(Long id) throws IOException {
		String qPath = "/hosting/web/moduleList/{id}";
		StringBuilder sb = path(qPath, id);
		String resp = execN(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhModuleList.class);
	}
871952
protected Client getClient(String id) throws IOException {
        Get get = new Get.Builder(getIndexName(), id).type("client").build(); //$NON-NLS-1$
        JestResult result = getClient().execute(get);
        if (result.isSucceeded()) {
            Client client = result.getSourceAsObject(Client.class);
            return client;
        } else {
            return null;
        }
    }
213994
public static String groupFromResourceId(String id) {
        return (id != null) ? ResourceId.fromString(id).resourceGroupName() : null;
    }
917469
public List<InetAddress> replicaNodesForId(final String id) {
        BucketConfig config = bucketConfig.get();

        if (config instanceof CouchbaseBucketConfig) {
            CouchbaseBucketConfig cbc = (CouchbaseBucketConfig) config;
            List<InetAddress> replicas = new ArrayList<InetAddress>();
            for (int i = 1; i <= cbc.numberOfReplicas(); i++) {
                replicas.add(replicaNodeForId(id, i));
            }
            return replicas;
        } else {
            throw new UnsupportedOperationException("Bucket type not supported: " + config.getClass().getName());
        }
    }
570752
@Override
	public boolean containsNode(long id) {
		return nodeIdMapping.containsKey(id) && !isRemoved(nodes.get(nodeIdMapping.get(id)));
	}
288752
public String getNodeId(final String clusterId, final HttpServletRequest request)
    {
        if (clusterId == null)
        {
            return null;
        }
        if (_workerName != null)
        {
            return clusterId + '.' + _workerName;
        }
        return clusterId;
    }
455731
public String getId(Node node) {
        String id = null;
        try {
            id = node.getIdentifier();
        } catch (RepositoryException e) {
            id = node.toString(); // use Java 'ID'
        }
        return id;
    }
452023
public int ENgetnodeindex( String id ) throws EpanetException {
        int[] index = new int[1];
        int error = epanet.ENgetnodeindex(id, index);
        checkError(error);
        return index[0];
    }
617342
public RedisClusterNode getPartitionByNodeId(String nodeId) {

        for (RedisClusterNode partition : nodeReadView) {
            if (partition.getNodeId().equals(nodeId)) {
                return partition;
            }
        }

        return null;
    }
333785
int getNodeId(long nanoTime) {
        // Check if it is a time to check for updated nodeId. We need to recheck, because if duplicate node ID
        // is assigned during a network split, this will be resolved after a cluster merge.
        // We throttle the calls to avoid contention due to the lock+unlock call in getMemberListJoinVersion().
        int nodeId = this.nodeId;
        if (nodeId != NODE_ID_OUT_OF_RANGE && nextNodeIdUpdate <= nanoTime) {
            int newNodeId = getNodeEngine().getClusterService().getMemberListJoinVersion();
            assert newNodeId >= 0 : "newNodeId=" + newNodeId;
            newNodeId += nodeIdOffset;
            nextNodeIdUpdate = nanoTime + NODE_ID_UPDATE_INTERVAL_NS;
            if (newNodeId != nodeId) {
                nodeId = newNodeId;

                // If our node ID is out of range, assign NODE_ID_OUT_OF_RANGE to nodeId
                if ((nodeId & -1 << BITS_NODE_ID) != 0) {
                    outOfRangeMembers.add(getNodeEngine().getClusterService().getLocalMember().getUuid());
                    logger.severe("Node ID is out of range (" + nodeId + "), this member won't be able to generate IDs. "
                            + "Cluster restart is recommended.");
                    nodeId = NODE_ID_OUT_OF_RANGE;
                }

                // we ignore possible double initialization
                this.nodeId = nodeId;
                if (logger.isFineEnabled()) {
                    logger.fine("Node ID assigned to '" + name + "': " + nodeId);
                }
            }
        }

        return nodeId;
    }
766453
private static String getFullInstanceId(String hostname, String id) {
    String str = hostname == null ? "" : hostname;
    str = str.replace('.', '_');
    str += (id == null ? "" : "-" + id);
    return str;
  }
85459
public static clusternode get(nitro_service service, Long nodeid) throws Exception{
		clusternode obj = new clusternode();
		obj.set_nodeid(nodeid);
		clusternode response = (clusternode) obj.get_resource(service);
		return response;
	}
1014709
private static String getServerIdString(String id) {

        if (id.contains(CmsADEManager.CLIENT_ID_SEPERATOR)) {
            id = id.substring(0, id.indexOf(CmsADEManager.CLIENT_ID_SEPERATOR));
        }
        return id;
    }