Class HttpDiskCache
- java.lang.Object
-
- jetbrains.buildServer.artifacts.impl.HttpDiskCache
-
public class HttpDiskCache extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_FILE_NAME
-
Constructor Summary
Constructors Constructor Description HttpDiskCache(File cacheDir, DigestCalculator calculator, ArtifactsCacheListener cacheMulticaster)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUpCache()voidcleanUpCache(long itemLifeTimeMillis)voidcleanUpCache(long itemLifeTimeMillis, Condition<Void> isInterrupted)voidcleanUpCache(Condition<Void> isInterrupted)longdelete(String key)CacheOptionsgetCacheOptions()FilegetFile(String key, String digest)FilegetFile(String key, URLContentRetriever transport)booleanisValid(String key, URLContentRetriever transport)Collection<File>listCache()voidprocessCacheEntries(Processor<jetbrains.buildServer.artifacts.impl.HttpCacheEntry> processor)voidputFile(String key, File file)voidputFile(String key, File file, String digest)voidputFiles(Map<String,File> keyToFile)voidputFiles(Map<String,File> keyToFile, Map<File,String> fileToDigest)static voidsetTimeService(TimeService timeService)
-
-
-
Field Detail
-
CONTENT_FILE_NAME
public static final String CONTENT_FILE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpDiskCache
public HttpDiskCache(@NotNull File cacheDir, @NotNull DigestCalculator calculator, @NotNull ArtifactsCacheListener cacheMulticaster)
-
-
Method Detail
-
isValid
public boolean isValid(@NotNull String key, @NotNull URLContentRetriever transport)
-
getFile
@NotNull public File getFile(@NotNull String key, @NotNull URLContentRetriever transport) throws IOException
- Throws:
IOException
-
getCacheOptions
@NotNull public CacheOptions getCacheOptions()
-
delete
public long delete(@NotNull String key)
-
cleanUpCache
public void cleanUpCache()
-
cleanUpCache
public void cleanUpCache(long itemLifeTimeMillis)
-
processCacheEntries
public void processCacheEntries(@NotNull Processor<jetbrains.buildServer.artifacts.impl.HttpCacheEntry> processor)
-
putFile
public void putFile(@NotNull String key, @NotNull File file) throws IOException- Throws:
IOException
-
putFile
public void putFile(@NotNull String key, @NotNull File file, @Nullable String digest) throws IOException- Throws:
IOException
-
putFiles
public void putFiles(@NotNull Map<String,File> keyToFile) throws IOException- Throws:
IOException
-
putFiles
public void putFiles(@NotNull Map<String,File> keyToFile, @NotNull Map<File,String> fileToDigest) throws IOException- Throws:
IOException
-
listCache
@NotNull public Collection<File> listCache()
-
setTimeService
public static void setTimeService(@NotNull TimeService timeService)
-
-