/** * Reduce the size of the cache to the maximum, if necessary. */ protected void shrinkCacheToMaximumSize() { // Rich Dougherty: This could be more efficient. while (cacheSize > maximumCacheSize) { getNodeFromCache(); } }
/** * Reduce the size of the cache to the maximum, if necessary. */ protected void shrinkCacheToMaximumSize() { // Rich Dougherty: This could be more efficient. while (cacheSize > maximumCacheSize) { getNodeFromCache(); } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Reduce the size of the cache to the maximum, if necessary. */ protected void shrinkCacheToMaximumSize() { // Rich Dougherty: This could be more efficient. while (cacheSize > maximumCacheSize) { getNodeFromCache(); } }
/** * Reduce the size of the cache to the maximum, if necessary. */ protected void shrinkCacheToMaximumSize() { // Rich Dougherty: This could be more efficient. while (cacheSize > maximumCacheSize) { getNodeFromCache(); } }
/** * Reduce the size of the cache to the maximum, if necessary. */ protected void shrinkCacheToMaximumSize() { // Rich Dougherty: This could be more efficient. while (cacheSize > maximumCacheSize) { getNodeFromCache(); } }
/** * Reduce the size of the cache to the maximum, if necessary. */ protected void shrinkCacheToMaximumSize() { // Rich Dougherty: This could be more efficient. while (cacheSize > maximumCacheSize) { getNodeFromCache(); } }
/** * Reduce the size of the cache to the maximum, if necessary. */ protected void shrinkCacheToMaximumSize() { // Rich Dougherty: This could be more efficient. while (cacheSize > maximumCacheSize) { getNodeFromCache(); } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }