Class CacheIndex
java.lang.Object
net.adoptopenjdk.icedteaweb.resources.cache.CacheIndex
Index of the cached resources.
This implementation uses a least recently accessed approach to evict resources when the total size of the cache exceeds the limit.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidclear()Removes all entries.(package private) CacheIndexEntrycreateEntry(CacheKey key, String entryId) Create a new entry.(package private) Set<CacheIndexEntry> findAllEntries(URL resourceHref) Finds all entries matching the resource independent of their version.(package private) Set<CacheIndexEntry> findAllEntries(URL resourceHref, VersionString versionString) Finds all entries matching the resource and version.(package private) Optional<CacheIndexEntry> Finds a single entry and marks it as accessed.(package private) Optional<CacheIndexEntry> Finds a single entry.(package private) List<CacheIndexEntry> private voidmarkAccessed(CacheIndexEntry entry) (package private) voidremoveEntry(CacheIndexEntry entry) Removes an entry from the index.(package private) voidremoveEntry(CacheKey key) Marks the entry for deletion(package private) void
-
Field Details
-
cacheFile
-
-
Constructor Details
-
CacheIndex
CacheIndex(CacheIndexFile cacheFile)
-
-
Method Details
-
findEntry
Finds a single entry.- Returns:
- the entry found or
empty, nevernull.
-
findAndMarkAsAccessed
Finds a single entry and marks it as accessed.- Returns:
- the entry found or
empty, nevernull.
-
findAllEntries
Finds all entries matching the resource independent of their version.- Returns:
- a set of all matching entries, never
null.
-
findAllEntries
Finds all entries matching the resource and version.- Returns:
- a set of all matching entries, never
null.
-
getAllEntries
List<CacheIndexEntry> getAllEntries()- Returns:
- all entries
-
createEntry
Create a new entry.- Returns:
- the newly created entry
-
removeEntry
Marks the entry for deletion -
removeEntry
Removes an entry from the index. -
requestCompression
void requestCompression() -
clear
void clear()Removes all entries. -
markAccessed
-