Package org.gorpipe.gor.clients
Class LocalFileCacheClient
java.lang.Object
org.gorpipe.gor.clients.LocalFileCacheClient
- All Implemented Interfaces:
AutoCloseable,org.gorpipe.client.FileCache
- Direct Known Subclasses:
NoCacheFileCacheClient
Local implementation of file cache client working directly against the file system. This can be used for non server
implementations of file cache.
-
Constructor Summary
ConstructorsConstructorDescriptionLocalFileCacheClient(org.gorpipe.gor.model.DriverBackedFileReader fileReader, String rootPath) LocalFileCacheClient(org.gorpipe.gor.model.DriverBackedFileReader fileReader, String rootPath, boolean useSubFolders, int subFolderSize) Constructs an instance of local file cache. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()lookupFile(String fingerprint) String[]multiLookup(String[] fingerprints, boolean defer) storeSibling(Path path, String fingerprint) storeWithSpecificCacheFilename(Path path, String fingerprint, String cacheFilename, long cost) tempLocation(String fingerprint, String ext)
-
Constructor Details
-
LocalFileCacheClient
public LocalFileCacheClient(org.gorpipe.gor.model.DriverBackedFileReader fileReader, String rootPath, boolean useSubFolders, int subFolderSize) Constructs an instance of local file cache. If sub folders are used the first subFolderSize letters of the fingerprint are used to create a sub folder storing the result file.- Parameters:
rootPath- File cache locationuseSubFolders- Inserts sub folders for fingerprints.subFolderSize- Insers sub folders for fingerprints.
-
LocalFileCacheClient
public LocalFileCacheClient(org.gorpipe.gor.model.DriverBackedFileReader fileReader, String rootPath)
-
-
Method Details
-
lookupFile
- Specified by:
lookupFilein interfaceorg.gorpipe.client.FileCache
-
store
- Specified by:
storein interfaceorg.gorpipe.client.FileCache
-
storeWithSpecificCacheFilename
public String storeWithSpecificCacheFilename(Path path, String fingerprint, String cacheFilename, long cost) - Specified by:
storeWithSpecificCacheFilenamein interfaceorg.gorpipe.client.FileCache
-
storeSibling
- Specified by:
storeSiblingin interfaceorg.gorpipe.client.FileCache
-
tempLocation
- Specified by:
tempLocationin interfaceorg.gorpipe.client.FileCache
-
multiLookup
- Specified by:
multiLookupin interfaceorg.gorpipe.client.FileCache
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-