# HG changeset patch # User Sascha L. Teichmann # Date 1304355058 0 # Node ID e07d1c3f76678e2dde0dbae9bb32fb2210d1bfe4 # Parent 52b6de9d0ab4e8a757d308b84761459447f6a7e8 Flush/persist cache at end of program. flys-artifacts/trunk@1798 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 52b6de9d0ab4 -r e07d1c3f7667 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Mon May 02 16:44:02 2011 +0000 +++ b/flys-artifacts/ChangeLog Mon May 02 16:50:58 2011 +0000 @@ -1,3 +1,11 @@ +2011-05-02 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/artifacts/cache/CacheFactory.java: + Flush/persist caches at program exists. + + * src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java: + Commented out too eloquent debug output. + 2011-05-02 Ingo Weinzierl * src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java: diff -r 52b6de9d0ab4 -r e07d1c3f7667 flys-artifacts/src/main/java/de/intevation/flys/artifacts/cache/CacheFactory.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/cache/CacheFactory.java Mon May 02 16:44:02 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/cache/CacheFactory.java Mon May 02 16:50:58 2011 +0000 @@ -38,6 +38,11 @@ // "net.sf.ehcache.enableShutdownHook", "true"); Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { + log.info("shutting down caches"); + for (String name: cacheManager.getCacheNames()) { + log.info("\tflushing '" + name + "'"); + cacheManager.getCache(name).flush(); + } cacheManager.shutdown(); } }); diff -r 52b6de9d0ab4 -r e07d1c3f7667 flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Mon May 02 16:44:02 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Mon May 02 16:50:58 2011 +0000 @@ -148,7 +148,7 @@ for (int i = 0; i < size; i++) { target = tmp.get(i, target); - logger.debug("++ W Tuple: " + target[2] + " -> " + target[0]); + //logger.debug("++ W Tuple: " + target[2] + " -> " + target[0]); series.add(target[2], target[0]); } @@ -183,7 +183,7 @@ for (int i = 0; i < size; i++) { target = tmp.get(i, target); - logger.debug("++ Q Tuple: " + target[2] + " -> " + target[1]); + //logger.debug("++ Q Tuple: " + target[2] + " -> " + target[1]); series.add(target[2], target[1]); }