This commit is contained in:
Lucio Lelii 2017-07-17 12:55:08 +00:00
parent 8df850f693
commit 44d66fdbb4
3 changed files with 9 additions and 2 deletions

View File

@ -49,6 +49,10 @@ public final class AlgorithmUpdater {
watcherThread.start();
}
protected void init(){
}
private class WatcherThread extends Thread {
private WatchService watcher;
@ -77,6 +81,7 @@ public final class AlgorithmUpdater {
try {
key = watcher.take();
} catch (InterruptedException x) {
log.error("DIRECTORY WATCHER IS INTERRUPTED",x);
return;
}
@ -96,7 +101,9 @@ public final class AlgorithmUpdater {
// context of the event.
WatchEvent<Path> ev = (WatchEvent<Path>)event;
Path filename = ev.context();
if (filename.toString().endsWith(".jar")){
log.debug("found filename {} ",filename.toString());
try{
final Class<URLClassLoader> sysclass = URLClassLoader.class;
// TODO some kind of a hack. Need to invent better solution.

View File

@ -85,8 +85,8 @@ public class GcubeAlgorithmRepository implements IAlgorithmRepository {
private static synchronized void updateRepository(){
if (reflection==null || updater.mustUpdate()){
log.info("updating repository ({}) ",updater.mustUpdate());
updater.reset();
log.info("update time passed, updating repository");
ConfigurationBuilder confBuilder = new ConfigurationBuilder()
.filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(PACKAGE_TO_FIND)))
.setUrls(((URLClassLoader)Thread.currentThread().getContextClassLoader()).getURLs());

View File

@ -25,7 +25,7 @@ no. 654119), SoBigData (grant no. 654024);
Version
--------------------------------------------------
1.0.0-SNAPSHOT (2017-07-12)
1.0.0-SNAPSHOT (2017-07-17)
Please see the file named "changelog.xml" in this directory for the release notes.