Lines Matching refs:client

228             const std::shared_ptr<ClientDescriptor<KEY, VALUE>>& client);
258 const std::shared_ptr<ClientDescriptor<KEY, VALUE>>& client) const;
261 * Return a vector of active ClientDescriptors that prevent this client from being added.
264 const std::shared_ptr<ClientDescriptor<KEY, VALUE>>& client) const;
289 * Block until the given client is no longer in the active clients list, or the timeout
295 status_t waitUntilRemoved(const std::shared_ptr<ClientDescriptor<KEY, VALUE>> client,
299 * Set the current listener for client add/remove events.
309 * The onClientRemoved method will be called when the client has been removed or evicted
311 * method will be called when the client has been added to the ClientManager that this
324 * vector of ClientDescriptors that are higher priority than the incoming client and
325 * either conflict with this client, or contribute to the resource cost if that would
326 * prevent the incoming client from being added.
331 const std::shared_ptr<ClientDescriptor<KEY, VALUE>>& client,
357 const std::shared_ptr<ClientDescriptor<KEY, VALUE>>& client) const {
359 return wouldEvictLocked(client);
365 const std::shared_ptr<ClientDescriptor<KEY, VALUE>>& client) const {
367 return wouldEvictLocked(client, /*returnIncompatibleClients*/true);
373 const std::shared_ptr<ClientDescriptor<KEY, VALUE>>& client,
379 if (client == nullptr) {
380 evictList.push_back(client);
384 const KEY& key = client->getKey();
385 int32_t cost = client->getCost();
386 int32_t priority = client->getPriority();
387 int32_t owner = client->getOwnerId();
403 // Switch back owner if the incoming client has the highest priority, as it is MRU
415 client->isConflicting(curKey));
421 // Pre-existing conflicting client with higher priority exists
423 evictList.push_back(client);
428 // Add a pre-existing client to the eviction list if:
429 // - We are adding a client with higher priority that conflicts with this one.
430 // - The total cost including the incoming client's is more than the allowable
431 // maximum, and the client has a non-zero cost, lower priority, and a different
432 // owner than the incoming client when the incoming client has the
438 // Find clients preventing the incoming client from being added
441 // Pre-existing conflicting client with higher priority exists
455 evictList.push_back(client);
466 const std::shared_ptr<ClientDescriptor<KEY, VALUE>>& client) {
468 auto evicted = wouldEvictLocked(client);
470 if (it != evicted.end() && *it == client) {
491 if (mListener != nullptr) mListener->onClientAdded(*client);
492 mClients.push_back(client);
583 const std::shared_ptr<ClientDescriptor<KEY, VALUE>> client,
596 if (i == client) {