Fix for Issue 18 - Use property autofetch.garbageCollectionOnShutdown to

control GC on shutdown behavior
This commit is contained in:
Robin Bygrave
2013-04-25 16:54:18 +12:00
parent 97cc2984cf
commit 384931d92e
2 changed files with 32 additions and 5 deletions
@@ -68,6 +68,8 @@ public class DefaultAutoFetchManager implements AutoFetchManager, Serializable {
private transient boolean queryTuningAddVersion;
private transient boolean garbageCollectionOnShutdown;
private transient AutofetchMode mode;
/**
@@ -93,6 +95,7 @@ public class DefaultAutoFetchManager implements AutoFetchManager, Serializable {
AutofetchConfig autofetchConfig = serverConfig.getAutofetchConfig();
garbageCollectionOnShutdown = autofetchConfig.isGarbageCollectionOnShutdown();
queryTuning = autofetchConfig.isQueryTuning();
queryTuningAddVersion = autofetchConfig.isQueryTuningAddVersion();
profiling = autofetchConfig.isProfiling();
@@ -269,10 +272,10 @@ public class DefaultAutoFetchManager implements AutoFetchManager, Serializable {
* </p>
*/
public void shutdown() {
//if (useFileLogging) {
if (garbageCollectionOnShutdown) {
collectUsageViaGC(-1);
serialize();
//}
}
}
/**