public class DirectoryCache
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.nio.file.Path |
cacheFile |
private java.util.Map<java.nio.file.Path,java.lang.String> |
createdFiles |
private int |
hits |
private static org.apache.logging.log4j.Logger |
LOGGER |
private java.nio.file.Path |
outputFolder |
private java.util.Set<java.nio.file.Path> |
protectedPaths |
private java.util.Map<java.nio.file.Path,java.lang.String> |
staleFiles |
Constructor and Description |
---|
DirectoryCache(java.nio.file.Path folder,
java.lang.String fileName) |
Modifier and Type | Method and Description |
---|---|
void |
addProtectedPath(java.nio.file.Path p_218456_1_) |
private void |
deleteStale() |
private java.util.stream.Stream<java.nio.file.Path> |
getFiles() |
java.lang.String |
getPreviousHash(java.nio.file.Path fileIn) |
boolean |
isStale(java.nio.file.Path fileIn) |
void |
recordHash(java.nio.file.Path fileIn,
java.lang.String hash) |
void |
writeCache() |
private static final org.apache.logging.log4j.Logger LOGGER
private final java.nio.file.Path outputFolder
private final java.nio.file.Path cacheFile
private int hits
private final java.util.Map<java.nio.file.Path,java.lang.String> staleFiles
private final java.util.Map<java.nio.file.Path,java.lang.String> createdFiles
private final java.util.Set<java.nio.file.Path> protectedPaths
public DirectoryCache(java.nio.file.Path folder, java.lang.String fileName) throws java.io.IOException
java.io.IOException
public void writeCache() throws java.io.IOException
java.io.IOException
@Nullable public java.lang.String getPreviousHash(java.nio.file.Path fileIn)
public void recordHash(java.nio.file.Path fileIn, java.lang.String hash)
public boolean isStale(java.nio.file.Path fileIn)
public void addProtectedPath(java.nio.file.Path p_218456_1_)
private void deleteStale() throws java.io.IOException
java.io.IOException
private java.util.stream.Stream<java.nio.file.Path> getFiles() throws java.io.IOException
java.io.IOException