- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {}
private void convertOldestHotToCold() { // the last entry of the stack is known to be hot Entry<V> last = stack.stackPrev; if (last == stack) { // never remove the stack head itself (this would mean the // internal structure of the cache is corrupt) throw new IllegalStateException(); } // remove from stack - which is done anyway in the stack pruning, // but we can do it here as well removeFromStack(last); // adding an entry to the queue will make it cold addToQueue(queue, last); pruneStack(); }
private void convertOldestHotToCold() { // the last entry of the stack is known to be hot Entry<V> last = stack.stackPrev; if (last == stack) { // never remove the stack head itself (this would mean the // internal structure of the cache is corrupt) throw new IllegalStateException(); } // remove from stack - which is done anyway in the stack pruning, // but we can do it here as well removeFromStack(last); // adding an entry to the queue will make it cold addToQueue(queue, last); pruneStack(); }
private void convertOldestHotToCold() { // the last entry of the stack is known to be hot Entry<V> last = stack.stackPrev; if (last == stack) { // never remove the stack head itself (this would mean the // internal structure of the cache is corrupt) throw new IllegalStateException(); } // remove from stack - which is done anyway in the stack pruning, // but we can do it here as well removeFromStack(last); // adding an entry to the queue will make it cold addToQueue(queue, last); pruneStack(); }
/** * Ensure the last entry of the stack is cold. */ private void pruneStack() { while (true) { Entry<V> last = stack.stackPrev; // must stop at a hot entry or the stack head, // but the stack head itself is also hot, so we // don't have to test it if (last.isHot()) { break; } // the cold entry is still in the queue removeFromStack(last); } }
/** * Ensure the last entry of the stack is cold. */ private void pruneStack() { while (true) { Entry<V> last = stack.stackPrev; // must stop at a hot entry or the stack head, // but the stack head itself is also hot, so we // don't have to test it if (last.isHot()) { break; } // the cold entry is still in the queue removeFromStack(last); } }
/** * Ensure the last entry of the stack is cold. */ private void pruneStack() { while (true) { Entry<V> last = stack.stackPrev; // must stop at a hot entry or the stack head, // but the stack head itself is also hot, so we // don't have to test it if (last.isHot()) { break; } // the cold entry is still in the queue removeFromStack(last); } }
usedMemory -= e.memory; if (e.stackNext != null) { removeFromStack(e);
/** * Ensure the last entry of the stack is cold. */ private void pruneStack() { while (true) { Entry<V> last = stack.stackPrev; // must stop at a hot entry or the stack head, // but the stack head itself is also hot, so we // don't have to test it if (last.isHot()) { break; } // the cold entry is still in the queue removeFromStack(last); } }
usedMemory -= e.memory; if (e.stackNext != null) { removeFromStack(e);
removeFromStack(e); if (wasEnd) { removeFromStack(e);
removeFromStack(e); if (wasEnd) { removeFromStack(e);
removeFromStack(e); if (wasEnd) { removeFromStack(e);
removeFromStack(e); if (wasEnd) { removeFromStack(e);
usedMemory -= e.memory; if (e.stackNext != null) { removeFromStack(e);
usedMemory -= e.memory; if (e.stackNext != null) { removeFromStack(e);
private void convertOldestHotToCold() { // the last entry of the stack is known to be hot Entry<V> last = stack.stackPrev; if (last == stack) { // never remove the stack head itself (this would mean the // internal structure of the cache is corrupt) throw new IllegalStateException(); } // remove from stack - which is done anyway in the stack pruning, // but we can do it here as well removeFromStack(last); // adding an entry to the queue will make it cold addToQueue(queue, last); pruneStack(); }