@ThreadSafe
public final class FileBackedIndex
extends java.lang.Object
implements org.apache.http.client.cache.HttpCacheStorage
HttpCacheStorage interface,
to be used with the Apache HttpClient Cache, using a directory with
the copy of the files and a serialized file map.| Constructor and Description |
|---|
FileBackedIndex(java.nio.file.Path baseDir,
org.apache.maven.plugin.logging.Log log)
Creates index backed by file "index.ser" in baseDir.
|
| Modifier and Type | Method and Description |
|---|---|
protected static java.net.URI |
asUri(java.lang.String key) |
org.apache.http.client.cache.HttpCacheEntry |
getEntry(java.lang.String uriString) |
void |
putEntry(java.lang.String key,
org.apache.http.client.cache.HttpCacheEntry entry) |
void |
removeEntry(java.lang.String key) |
void |
updateEntry(java.lang.String key,
org.apache.http.client.cache.HttpCacheUpdateCallback callback) |
public FileBackedIndex(java.nio.file.Path baseDir,
org.apache.maven.plugin.logging.Log log)
throws java.nio.file.NotDirectoryException
baseDir - directory where the index file should be stored.java.nio.file.NotDirectoryExceptionprotected static java.net.URI asUri(java.lang.String key)
public void putEntry(java.lang.String key,
org.apache.http.client.cache.HttpCacheEntry entry)
throws java.io.IOException
putEntry in interface org.apache.http.client.cache.HttpCacheStoragejava.io.IOExceptionpublic org.apache.http.client.cache.HttpCacheEntry getEntry(java.lang.String uriString)
getEntry in interface org.apache.http.client.cache.HttpCacheStoragepublic void removeEntry(java.lang.String key)
removeEntry in interface org.apache.http.client.cache.HttpCacheStoragepublic void updateEntry(java.lang.String key,
org.apache.http.client.cache.HttpCacheUpdateCallback callback)
updateEntry in interface org.apache.http.client.cache.HttpCacheStorageCopyright © 2009-2023 Open-Source. All Rights Reserved.