org.openrdf.server.metadata.cache
Class CacheIndex
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<String,WeakReference<CachedRequest>>
org.openrdf.server.metadata.cache.CacheIndex
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,WeakReference<CachedRequest>>
public class CacheIndex
- extends LinkedHashMap<String,WeakReference<CachedRequest>>
- See Also:
- Serialized Form
| Methods inherited from interface java.util.Map |
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
CacheIndex
public CacheIndex(File dir,
int maxCapacity)
getMaxCapacity
public int getMaxCapacity()
setMaxCapacity
public void setMaxCapacity(int maxCapacity)
invalidate
public void invalidate(String... locations)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
findCachedRequest
public CachedRequest findCachedRequest(String url)
throws IOException
- Throws:
IOException
removeEldestEntry
protected boolean removeEldestEntry(Map.Entry<String,WeakReference<CachedRequest>> eldest)
- Overrides:
removeEldestEntry in class LinkedHashMap<String,WeakReference<CachedRequest>>
Copyright © 2004-2009 James Leigh Services Inc.. All Rights Reserved.