Evicts a file from the cache. If the cache is exceeding capacity,
then the cache calls this method to indicate that it is evicting
a file from the cache. This is part of the Eviction Interface.
181680
public void evictCache(Path hdfsPath, Path localPath, long size)
    throws IOException {
    boolean done = cacheFs.delete(localPath, false);
    if (!done) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Evict for path: " + hdfsPath +
                  " local path " + localPath + " unsuccessful.");
      }
    }
  }
121720
private void evict() {
    if (windowSize <= (window.length - 1)) {
      return;
    }

    Node candidate = window[random.nextInt(window.length)];
    removeFromTable(window, candidate);
    windowSize--;

    main[mainSize] = candidate;
    candidate.index = mainSize;
    mainSize++;

    if (data.size() > maximumSize) {
      Node victim = main[random.nextInt(main.length)];
      Node evict = admittor.admit(candidate.key, victim.key) ? victim : candidate;
      removeFromTable(main, evict);
      data.remove(evict.key);
      mainSize--;

      policyStats.recordEviction();
    }
  }
922150
private void evict(Node candidate) {
    // if (|T1| ≥ 1) and ((x ∈ B2 and |T1| = p) or (|T1| > p))
    //   then move the LRU page of T1 to the top of B1 and remove it from the cache.
    // else move the LRU page in T2 to the top of B2 and remove it from the cache.

    if ((sizeT1 >= 1) && (((candidate.type == QueueType.B2) && (sizeT1 == p)) || (sizeT1 > p))) {
      Node victim = headT1.next;
      victim.remove();
      victim.type = QueueType.B1;
      victim.appendToTail(headB1);
      sizeT1--;
      sizeB1++;
    } else {
      Node victim = headT2.next;
      victim.remove();
      victim.type = QueueType.B2;
      victim.appendToTail(headB2);
      sizeT2--;
      sizeB2++;
    }
    policyStats.recordEviction();
  }
815699
private void evict() {
    if (sizeWindow <= maxWindow) {
      return;
    }

    Node candidate = headWindowProbation.next;

    sizeWindow--;
    candidate.remove();
    candidate.status = Status.MAIN_PROBATION;
    candidate.appendToTail(headMainProbation);

    if (data.size() > maximumSize) {
      Node victim = headMainProbation.next;
      Node evict = admittor.admit(candidate.key, victim.key) ? victim : candidate;
      data.remove(evict.key);
      evict.remove();

      policyStats.recordEviction();
    }
  }
1148433
protected synchronized boolean findAndRemoveFromGCBuffer(long expirationTime, int hashcode, int size) {
        EvictionTableEntry evt = null;
        int i;
        for (i = 0; i < garbageCollectorBuffer.size(); i++) {
            evt = (EvictionTableEntry) garbageCollectorBuffer.get(i);
            if (evt.expirationTime == expirationTime && evt.hashcode == hashcode && evt.size == size) {
                break;
            }
        }
        if (i < garbageCollectorBuffer.size()) {
            this.garbageCollectorBuffer.remove(i);
            if (evt != null) {
                cod.htod.evictionEntryPool.add(evt);
            }
            return true;
        }
        return false;
    }
210121
private void evict(Node candidate) {
    if (data.size() > maximumSize) {
      List<Node> sample = (policy == EvictionPolicy.RANDOM)
          ? Arrays.asList(table)
          : sampleStrategy.sample(table, candidate, sampleSize, random, policyStats);
      Node victim = policy.select(sample, random, tick);
      policyStats.recordEviction();

      if (admittor.admit(candidate.key, victim.key)) {
        removeFromTable(victim);
        data.remove(victim.key);
      } else {
        removeFromTable(candidate);
        data.remove(candidate.key);
      }
    }
  }
1247655
public void clear() {
    if (cache == null) {
      return;
    }
    synchronized (cache) {
      inFlushAll = true;
      cache.invalidateAll();
      out.clear();
      inFlushAll = false;
    }
  }
1368438
public void evictCache(String key) {
        H.Session sess = session();
        if (null != sess) {
            sess.evict(key);
        } else {
            app().cache().evict(key);
        }
    }
1365742
@Trivial
    protected synchronized void evictStaleEntries() {
/*
 * final String METHODNAME = "evictStaleEntries";
 * if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
 * int size = primaryTable.size() + secondaryTable.size() + tertiaryTable.size();
 * Tr.debug(tc, METHODNAME + " The current cache size is " + size + "( " + primaryTable.size() + ", " + secondaryTable.size() + ", " + tertiaryTable.size() + ")");
 * }
 */

        // log only when we evict the last table
        if (!tertiaryTable.isEmpty()) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "evictStaleEntries Evicting tertiaryTable cache " + cacheName + ", size is " + tertiaryTable.size());
            }
        }
        tertiaryTable = secondaryTable;
        secondaryTable = primaryTable;
        primaryTable = new ConcurrentHashMap<String, Object>((minSize > secondaryTable.size()) ? minSize : secondaryTable.size());
    }
1182676
def evict(self, urls):
        
        if isinstance(urls, six.text_type):
            urls = [urls]
        urls = set(normalize_url(url) for url in urls)
        retval = 0
        for key in list(self.cache):
            if key[0] in urls:
                retval += 1
                del self.cache[key]
                del self.timeouts[key]
        return retval
1140069
private void evict(Node candidate) {
    if (data.size() > maximumSize) {
      Node evict;
      Node victim = head.next;
      if (admittor.admit(candidate.key, victim.key)) {
        evict = victim;
      } else if (adapt(candidate)) {
        evict = victim;
      } else {
        evict = candidate;
        feedback.put(candidate.key);
      }
      data.remove(evict.key);
      evict.remove();

      policyStats.recordEviction();
    }
  }
1372986
public synchronized void delete() {
		try {
			clear();
		} catch (Exception ign) {
		}
		try {
			close();
		} catch (Exception ign) {
		}
		try {
			fileRedo.delete();
		} catch (Exception ign) {
		}
		try {
			fileStorage.delete();
		} catch (Exception ign) {
		}
		try {
			fileFreeBlocks.delete();
		} catch (Exception ign) {
		}
	}
546308
@Override
    @InterfaceAudience.Private
    public void evictAllConnectionsInPool() {
        if (client != null) {
            ConnectionPool pool = client.connectionPool();
            if (pool != null)
                pool.evictAll();
        }
    }
673964
private void evict() {
    if (sizeWindow <= maxWindow) {
      return;
    }

    Node candidate = headWindow.next;
    sizeWindow--;

    candidate.remove();
    candidate.status = Status.PROBATION;
    candidate.appendToTail(headProbation);

    if (data.size() > maximumSize) {
      Node evict;
      Node victim = headProbation.next;
      if (admittor.admit(candidate.key, victim.key)) {
        evict = victim;
      } else if (adapt(candidate)) {
        evict = victim;
      } else {
        evict = candidate;
        feedback.put(candidate.key);
      }
      data.remove(evict.key);
      evict.remove();

      policyStats.recordEviction();
    }
  }
1084788
public void evict() throws Exception
    {
        assertOpen();

        boolean isEmpty;
        synchronized (this)
        {
            isEmpty = pool.isEmpty();
        }
        if (!isEmpty)
        {
            if (softMinEvictableIdleTimeMillis > 0)
            {
                int numToEvict = getNumIdle() - getMinIdle();
                evict(System.currentTimeMillis() - softMinEvictableIdleTimeMillis, numToEvict);
            }
            if (minEvictableIdleTimeMillis > 0)
            {
                int numToEvict = getNumIdle();
                evict(System.currentTimeMillis() - minEvictableIdleTimeMillis, numToEvict);
            }
        }
    }
24123
private void evict() {
    if (sizeWindow <= maxWindow) {
      return;
    }

    Node candidate = headWindow.next;
    candidate.remove();
    sizeWindow--;

    candidate.appendToTail(headMain);
    candidate.status = Status.MAIN;
    sizeMain++;

    if (sizeMain > maxMain) {
      Node victim = headMain.next;
      Node evict = admittor.admit(candidate.key, victim.key) ? victim : candidate;
      data.remove(evict.key);
      evict.remove();
      sizeMain--;

      policyStats.recordEviction();
    }
  }
672303
def _purge(self):
        
        if len(self.cache) <= self.max_size:
            return

        cache = self.cache
        refcount = self.refcount
        queue = self.queue
        max_size = self.max_size

        # purge least recently used entries, using refcount to count entries
        # that appear multiple times in the queue
        while len(cache) > max_size:
            refc = 1
            while refc:
                k = queue.popleft()
                refc = refcount[k] = refcount[k] - 1
            del cache[k]
            del refcount[k]