Class LolCache
- java.lang.Object
-
- org.apache.flink.tests.util.cache.LolCache
-
- All Implemented Interfaces:
DownloadCache
,ExternalResource
,org.junit.rules.TestRule
public final class LolCache extends Object
DownloadCache
implementation that does not cache anything.- See Also:
LolCacheFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description LolCache(org.junit.rules.TemporaryFolder folder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterTestSuccess()
void
before()
Path
getOrDownload(String url, Path targetDir)
Returns either a cached or newly downloaded version of the given file.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.util.ExternalResource
afterTestFailure, apply
-
-
-
-
Method Detail
-
afterTestSuccess
public void afterTestSuccess()
- Specified by:
afterTestSuccess
in interfaceExternalResource
-
before
public void before() throws IOException
- Specified by:
before
in interfaceExternalResource
- Throws:
IOException
-
getOrDownload
public Path getOrDownload(String url, Path targetDir) throws IOException
Description copied from interface:DownloadCache
Returns either a cached or newly downloaded version of the given file. The returned file path is guaranteed to be located in the given target directory.- Specified by:
getOrDownload
in interfaceDownloadCache
- Parameters:
url
- File/directory to downloadtargetDir
- directory to place file in- Returns:
- downloaded or cached file
- Throws:
IOException
- if any IO operation fails
-
-