Adds the given server to the cache.

@param server The server to add.
484153
public void addServerToCache(ServerImpl server) {
        // Remove in case, there's an old instance in cache
        removeServerFromCache(server.getId());

        nonReadyServers.put(server.getId(), server);
        server.addServerReadyConsumer(s -> {
            nonReadyServers.remove(s.getId());
            removeUnavailableServerFromCache(s.getId());
            servers.put(s.getId(), s);
        });
    }
271813
public void addCache(Object key, String className, Object model) {
		if (key == null)
			return;
		modelCacheManager.saveCache(key, className, model);

	}
802001
private void addLoadBalancerListener() {
        if (!(lbContext.getLoadBalancer() instanceof BaseLoadBalancer)) {
            return;
        }
        
        ((BaseLoadBalancer) lbContext.getLoadBalancer()).addServerListChangeListener(new ServerListChangeListener() {
            @Override
            public void serverListChanged(List<Server> oldList, List<Server> newList) {
                Set<Server> removedServers = new HashSet<Server>(oldList);
                removedServers.removeAll(newList);
                for (Server server: rxClientCache.keySet()) {
                    if (removedServers.contains(server)) {
                        // this server is no longer in UP status
                        removeClient(server);
                    }
                }
            }
        });
    }
522263
public void addServerCustomizers(
			ServerRSocketFactoryCustomizer... serverCustomizers) {
		Assert.notNull(serverCustomizers, "ServerCustomizer must not be null");
		this.serverCustomizers.addAll(Arrays.asList(serverCustomizers));
	}
53799
def _add_client(self, url, key=None, secret=None):
        

        if "://" in url:
            server, endpoint = self._deconstruct_url(url)
        else:
            server = url

        if server not in self._server_cache:
            if not (key and secret):
                client = Client(
                    webfinger=self.client.webfinger,
                    name=self.client.name,
                    type=self.client.type,
                )
                client.set_pump(self)
                client.register(server)
            else:
                client = Client(
                    webfinger=self.client.webfinger,
                    key=key,
                    secret=secret,
                    type=self.client.type,
                    name=self.client.name,
                )
                client.set_pump(self)

            self._server_cache[server] = client
651208
public void
setCache(Cache cache) {
	if (cache == null) {
		this.cache = new Cache(dclass);
		this.temporary_cache = true;
	} else {
		this.cache = cache;
		this.temporary_cache = false;
	}
}
1091941
public void setDirectoryServers(List<String> servers){
        if(servers == null || servers.size() == 0){
            return;
        }
        directoryServers = new DirectoryServers(servers);
        connection.setDirectoryServers(directoryServers.getNextDirectoryServer());
    }
516066
public void addServerSocket(
      InternalInstrumented<ServerStats> server, InternalInstrumented<SocketStats> socket) {
    ServerSocketMap serverSockets = perServerSockets.get(id(server));
    assert serverSockets != null;
    add(serverSockets, socket);
  }
1032438
public void addCache(String cacheName, AsyncLoadingCache cache) {
        children.put(cacheName, cache.synchronous());
    }
1016528
void enqueue(ServerRequest request) {
        synchronized (reqQueueLockObject) {
            if (request != null) {
                queue.add(request);
                if (getSize() >= MAX_ITEMS) {
                    queue.remove(1);
                }
                persist();
            }
        }
    }
1259225
private void put(T item) {
        HashMap<String,Object> keys;

        if( item == null ) {
            throw new NullPointerException("Multi caches may not have null values.");
        }
        keys = getKeys(item);
        synchronized( this ) {
            for( String key : caches.keySet() ) {
                ConcurrentCache<Object,T> cache = caches.get(key);
                Object ob = keys.get(key);

                if( ob instanceof BigDecimal ) {
                    ob = ((BigDecimal)ob).longValue();
                }
                cache.put(ob, item);
            }
        }
    }
35711
public OperationFuture<Server> delete(Server server) {
        BaseServerResponse response = client.delete(idByRef(server));

        return new OperationFuture<>(
            server,
            response.findStatusId(),
            queueClient
        );
    }
1211955
function setCurrentServer(server) {
    if (server) {
        server.makeCurrent();
        assert.strictEqual(getCurrentServer(), server);
    }
    else {
        init.initOptions.serverUrl = null;
    }
}
641291
public void addObject(final T _object)
    {
        final Map<Long, T> newCache4Id =  getNewCache4Id();
        final Map<String, T> newCache4Name = getNewCache4Name();
        final Map<UUID, T>  newCache4UUID = getNewCache4UUID();

        if (getCache4Id() != null) {
            newCache4Id.putAll(getCache4Id());
        }

        if (getCache4Name() != null) {
            newCache4Name.putAll(getCache4Name());
        }

        if (getCache4UUID() != null) {
            newCache4UUID.putAll(getCache4UUID());
        }

        newCache4Id.put(_object.getId(), _object);
        newCache4Name.put(_object.getName(), _object);
        newCache4UUID.put(_object.getUUID(), _object);

        // replace old cache with new values
        // it is thread save because of volatile
        setCache4Id(newCache4Id);
        setCache4Name(newCache4Name);
        setCache4UUID(newCache4UUID);
    }
120880
protected function addServer($cf)
    {
        $this->formatConfig($cf);
        if ($this->memcached)
        {
            $this->cache->addServer($cf['host'], $cf['port'], $cf['weight']);
        }
        else
        {
            $this->cache->addServer($cf['host'], $cf['port'], $cf['persistent'], $cf['weight']);
        }
    }
967406
public function addServer($tld, $server)
    {
        $this->server[(string) $tld] = (string)$server;
        return $this;
    }
1071552
public void startServer(de.uniulm.omi.cloudiator.flexiant.client.domain.Server server)
        throws FlexiantException {
        if (server == null) {
            throw new IllegalArgumentException("The given server must not be null.");
        }

        this.startServer(server.getId());
    }