/** * Flushes the given entry from the cache. Does nothing if entry does not * exist in cache. * * @param key Key of object to flush */ public void flush (K key) { LRUCacheEntry<K, V> entry; entry = this.entryTable.get(key); /* If entry does not exist, return */ if (entry == null) return; privateRemoveEntry (entry, false); }
/** * Flushes the given entry from the cache. Does nothing if entry does not * exist in cache. * * @param key Key of object to flush */ public void flush (Object key) { LRUCacheEntry entry; entry = (LRUCacheEntry) this.entryTable.get(key); /* If entry does not exist, return */ if (entry == null) return; privateRemoveEntry (entry, false); } /*
/** * Flushes the given entry from the cache. Does nothing if entry does not * exist in cache. * * @param key Key of object to flush */ public void flush (Object key) { LRUCacheEntry entry; entry = (LRUCacheEntry) this.entryTable.get(key); /* If entry does not exist, return */ if (entry == null) return; privateRemoveEntry (entry, false); } /*
/** * Flushes the given entry from the cache. Does nothing if entry does not * exist in cache. * * @param key Key of object to flush */ public void flush (Object key) { LRUCacheEntry entry; entry = (LRUCacheEntry) this.entryTable.get(key); /* If entry does not exist, return */ if (entry == null) return; privateRemoveEntry (entry, false); } /*
/** * Flushes the given entry from the cache. Does nothing if entry does not * exist in cache. * * @param key Key of object to flush */ public void flush (Object key) { LRUCacheEntry entry; entry = (LRUCacheEntry) this.entryTable.get(key); /* If entry does not exist, return */ if (entry == null) return; privateRemoveEntry (entry, false); } /*
/** * Flushes the given entry from the cache. Does nothing if entry does not * exist in cache. * * @param key Key of object to flush */ public void flush (Object key) { LRUCacheEntry entry; entry = (LRUCacheEntry) this.entryTable.get(key); /* If entry does not exist, return */ if (entry == null) return; privateRemoveEntry (entry, false); } /*
/** * Flushes the given entry from the cache. Does nothing if entry does not * exist in cache. * * @param key Key of object to flush */ public void flush (Object key) { LRUCacheEntry entry; entry = (LRUCacheEntry) this.entryTable.get(key); /* If entry does not exist, return */ if (entry == null) return; privateRemoveEntry (entry, false); } /*
/** * Removes and returns the value in the cache for the given key. * If the key is not in the cache, returns null. * * @param key Key of object to remove from cache. * @return Value removed from cache. */ public V removeKey (K key) { LRUCacheEntry<K, V> entry = this.entryTable.get(key); if (entry == null) { return null; } V value = entry.value; privateRemoveEntry (entry, false); return value; }
/** * Removes and returns the value in the cache for the given key. * If the key is not in the cache, returns null. * * @param key Key of object to remove from cache. * @return Value removed from cache. */ public Object removeKey (Object key) { LRUCacheEntry entry = (LRUCacheEntry) this.entryTable.get(key); if (entry == null) { return null; } Object value = entry.value; privateRemoveEntry (entry, false); return value; } /**
/** * Removes and returns the value in the cache for the given key. * If the key is not in the cache, returns null. * * @param key Key of object to remove from cache. * @return Value removed from cache. */ public Object removeKey (Object key) { LRUCacheEntry entry = (LRUCacheEntry) this.entryTable.get(key); if (entry == null) { return null; } Object value = entry.value; privateRemoveEntry (entry, false); return value; } /**
/** * Removes and returns the value in the cache for the given key. * If the key is not in the cache, returns null. * * @param key Key of object to remove from cache. * @return Value removed from cache. */ public Object removeKey (Object key) { LRUCacheEntry entry = (LRUCacheEntry) this.entryTable.get(key); if (entry == null) { return null; } Object value = entry.value; privateRemoveEntry (entry, false); return value; } /**
/** * Removes and returns the value in the cache for the given key. * If the key is not in the cache, returns null. * * @param key Key of object to remove from cache. * @return Value removed from cache. */ public Object removeKey (Object key) { LRUCacheEntry entry = (LRUCacheEntry) this.entryTable.get(key); if (entry == null) { return null; } Object value = entry.value; privateRemoveEntry (entry, false); return value; } /**
/** * Removes and returns the value in the cache for the given key. * If the key is not in the cache, returns null. * * @param key Key of object to remove from cache. * @return Value removed from cache. */ public Object removeKey (Object key) { LRUCacheEntry entry = (LRUCacheEntry) this.entryTable.get(key); if (entry == null) { return null; } Object value = entry.value; privateRemoveEntry (entry, false); return value; } /**
/** * Updates the timestamp for the given entry, ensuring that the queue is * kept in correct order. The entry must exist */ protected void updateTimestamp (LRUCacheEntry entry) { entry.timestamp = this.timestampCounter++; if (this.entryQueue != entry) { privateRemoveEntry (entry, true); privateAddEntry (entry, true); } return; } }
/** * Updates the timestamp for the given entry, ensuring that the queue is * kept in correct order. The entry must exist */ protected void updateTimestamp (LRUCacheEntry<K, V> entry) { entry.timestamp = this.timestampCounter++; if (this.entryQueue != entry) { privateRemoveEntry (entry, true); privateAddEntry (entry, true); } return; } }
/** * Updates the timestamp for the given entry, ensuring that the queue is * kept in correct order. The entry must exist */ protected void updateTimestamp (LRUCacheEntry entry) { entry.timestamp = this.timestampCounter++; if (this.entryQueue != entry) { privateRemoveEntry (entry, true); privateAddEntry (entry, true); } return; } }
/** * Updates the timestamp for the given entry, ensuring that the queue is * kept in correct order. The entry must exist */ protected void updateTimestamp (LRUCacheEntry entry) { entry.timestamp = this.timestampCounter++; if (this.entryQueue != entry) { privateRemoveEntry (entry, true); privateAddEntry (entry, true); } return; } }
/** * Updates the timestamp for the given entry, ensuring that the queue is * kept in correct order. The entry must exist */ protected void updateTimestamp (LRUCacheEntry entry) { entry.timestamp = this.timestampCounter++; if (this.entryQueue != entry) { privateRemoveEntry (entry, true); privateAddEntry (entry, true); } return; } }
/** * Updates the timestamp for the given entry, ensuring that the queue is * kept in correct order. The entry must exist */ protected void updateTimestamp (LRUCacheEntry entry) { entry.timestamp = this.timestampCounter++; if (this.entryQueue != entry) { privateRemoveEntry (entry, true); privateAddEntry (entry, true); } return; } }
/** * Updates the timestamp for the given entry, ensuring that the queue is * kept in correct order. The entry must exist */ protected void updateTimestamp (LRUCacheEntry entry) { entry.timestamp = this.timestampCounter++; if (this.entryQueue != entry) { privateRemoveEntry (entry, true); privateAddEntry (entry, true); } return; } }