Add a server to the list of available servers.
@param id Neo4j cluster id
@param uri websocket uri
763561
public synchronized void onServerReconnected(final String id, final String uri) {
        logger.debug("[onServerReconnected] id = {}, uri = {}", id, uri);

        if (id.length() == 0) {
            Server server = getServerByUri(uri);
            server.register();
            server.setAvailable(true);
        }

        refreshServers();
    }
1141932
public static void delete(final String id) throws AppPlatformException, IOException {
        assert(id != null);
        final BandwidthClient client = BandwidthClient.getInstance();
        client.delete(client.getUserResourceInstanceUri(BandwidthConstants.DOMAINS_URI_PATH, id));
    }
225719
public void addConnection(ServerSentEventConnection connection) {
        Objects.requireNonNull(connection, Required.CONNECTION.toString());

        final String url = RequestUtils.getServerSentEventURL(connection);
        Set<ServerSentEventConnection> uriConnections = getConnections(url);
        if (uriConnections == null) {
            uriConnections = new HashSet<>();
            uriConnections.add(connection);
        } else {
            uriConnections.add(connection);
        }
        setConnections(url, uriConnections);
    }
1216952
public static Uri createUri(Class<? extends Model> type, Long id) {
		final StringBuilder uri = new StringBuilder();
		uri.append("content://");
		uri.append(sAuthority);
		uri.append("/");
		uri.append(Ollie.getTableName(type).toLowerCase());

		if (id != null) {
			uri.append("/");
			uri.append(id.toString());
		}

		return Uri.parse(uri.toString());
	}
942471
public ClientBuilderForConnector forServer(String uri, @Nullable String version) {
        configBuilder.withDockerHost(URI.create(uri).toString())
                .withApiVersion(version);
        return this;
    }
1277819
public UriMappingResolver addResource(String uri, String resource) {
        uriMap.put(uri, resource);
        return this;
    }
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());
        }
    }
123429
public boolean addGrant(
      ClusterNode node, String sessionId, ResourceRequestInfo req) {
    synchronized (node) {
      if (node.deleted) {
        return false;
      }
      if (!node.checkForGrant(Utilities.getUnitResourceRequest(
        req.getType()), resourceLimit)) {
        return false;
      }

      node.addGrant(sessionId, req);
      loadManager.incrementLoad(req.getType());
      hostsToSessions.get(node).add(sessionId);
      if (!node.checkForGrant(Utilities.getUnitResourceRequest(
        req.getType()), resourceLimit)) {
        RunnableIndices r = typeToIndices.get(req.getType());
        r.deleteRunnable(node);
      }
    }
    return true;
  }
1241876
public void addRepository(String id, URL url) {
        for (UpdateRepository ur : repositories) {
            if (ur.getId().equals(id)) {
                throw new RuntimeException("Repository with id " + id + " already exists");
            }
        }
        repositories.add(new DefaultUpdateRepository(id, url));
    }
1361561
public Optional<Server> getPossiblyUnreadyServerById(long id) {
        if (nonReadyServers.containsKey(id)) {
            return Optional.ofNullable(nonReadyServers.get(id));
        }
        return Optional.ofNullable(servers.get(id));
    }
1289378
public synchronized void onServerUnavailable(final String id) {
        logger.debug("[onServerUnavailable] id = {}", id);

        Server server = getServerById(id);

        if (server != null) {
            server.setAvailable(false);
            refreshServers();
        }
    }
1351297
public void connect(URI endpoint) {
        if (endpoint.equals(this.getEndpoint()) && isListening) {
            return;
        }

        OkHttpClient client = new OkHttpClient.Builder()
                .readTimeout(0, TimeUnit.MILLISECONDS)
                .build();
        Request request = new Request.Builder()
                .url(endpoint.toString())
                .build();
        client.newWebSocket(request, this);
        client.dispatcher().executorService().shutdown();

        setEndpoint(endpoint);
    }
778068
public GraphqlApi withUris(java.util.Map<String, String> uris) {
        setUris(uris);
        return this;
    }
881454
public void addEntityId(long entityId)
    {
        if(this.entityIds == null)
            this.entityIds = new ArrayList<Long>();
        this.entityIds.add(entityId);
    }
878686
public void addRequire(final String id) {
        final PluginRequirement requirement = new PluginRequirement();
        requirement.addPlugins(id);
        requireList.add(requirement);
    }
856582
public static base_responses add(nitro_service client, clusternode resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			clusternode addresources[] = new clusternode[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new clusternode();
				addresources[i].nodeid = resources[i].nodeid;
				addresources[i].ipaddress = resources[i].ipaddress;
				addresources[i].state = resources[i].state;
				addresources[i].backplane = resources[i].backplane;
				addresources[i].priority = resources[i].priority;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
415835
public void add(final String prefix, final String uri) {
    if (prefix == null) {
      defaultNS = uri;
    }

    addToMap(prefix, uri);
  }