/** * Evicts this entry, removing it from the queue and setting its status to * cold non-resident. If the entry is already absent from the stack, it is * removed from the backing map; otherwise it remains in order for its * recency to be maintained. */ private void evict() { removeFromQueue(); removeFromStack(); nonResident(); owner = null; }
/** * Moves this entry from the stack to the queue, marking it cold * (as hot entries must remain in the stack). This should only be called * on resident entries, as non-resident entries should not be made resident. * The bottom entry on the queue is always hot due to stack pruning. */ private void migrateToQueue() { removeFromStack(); cold(); }
/** * Evicts this entry, removing it from the queue and setting its status to * cold non-resident. If the entry is already absent from the stack, it is * removed from the backing map; otherwise it remains in order for its * recency to be maintained. */ private void evict() { removeFromQueue(); removeFromStack(); nonResident(); owner = null; }
/** * Moves this entry from the stack to the queue, marking it cold * (as hot entries must remain in the stack). This should only be called * on resident entries, as non-resident entries should not be made resident. * The bottom entry on the queue is always hot due to stack pruning. */ private void migrateToQueue() { removeFromStack(); cold(); }