-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jorrit Poelen
committed
Mar 12, 2024
1 parent
330081f
commit 2a47070
Showing
3 changed files
with
38 additions
and
27 deletions.
There are no files selected for viewing
10 changes: 6 additions & 4 deletions
10
nomer/src/main/java/org/globalbioticinteractions/nomer/cmd/CmdClean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
package org.globalbioticinteractions.nomer.cmd; | ||
|
||
import org.apache.commons.io.FileUtils; | ||
import org.globalbioticinteractions.nomer.match.TermMatcherContextCaching; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import picocli.CommandLine; | ||
|
||
import java.io.File; | ||
|
||
@CommandLine.Command(name = "clean", description = "Cleans term matcher cache.") | ||
public class CmdClean extends CmdMatcherParams { | ||
public class CmdClean implements Runnable { | ||
private final static Logger LOG = LoggerFactory.getLogger(CmdClean.class); | ||
|
||
@Override | ||
public void run() { | ||
LOG.info("cleaning cache at [" + getCacheDir() + "]..."); | ||
FileUtils.deleteQuietly(new File(getCacheDir())); | ||
LOG.info("cleaning cache at [" + getCacheDir() + "] done."); | ||
File cacheDir = TermMatcherContextCaching.getOrCreateDefaultCacheDir(); | ||
LOG.info("cleaning cache at [" + cacheDir.getAbsolutePath() + "]..."); | ||
FileUtils.deleteQuietly(cacheDir); | ||
LOG.info("cleaning cache at [" + cacheDir.getAbsolutePath() + "] done."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters