}
if (eventMgr == null) {
throw new IllegalArgumentException("Argument 'eventMgr' is null");
}
GarbageCollectionConfiguration gcConfig =
config.getGarbageCollectionConfiguration();
// read the value and ensure that it is within
// the specified limits
int low = gcConfig.getLowWaterThreshold();
if (low < 10) {
low = 10;
}
if (low > 50) {
low = 50;
}
_gcLowWaterThreshold = low;
// read the memory check interval and fix it if it falls
// outside the constraints
int mem_interval = gcConfig.getMemoryCheckInterval();
if ((mem_interval > 0) &&
(mem_interval < 5)) {
mem_interval = 5;
}
_memoryCheckInterval = mem_interval * 1000;
// read the gc interval, which is optional
int gc_interval = gcConfig.getGarbageCollectionInterval();
if (gc_interval <= 0) {
gc_interval = 0;
}
_gcInterval = gc_interval * 1000;
// read the gc thread priority
int gc_priority = gcConfig.getGarbageCollectionThreadPriority();
if (gc_priority < Thread.MIN_PRIORITY) {
gc_priority = Thread.MIN_PRIORITY;
}
if (gc_priority > Thread.MAX_PRIORITY) {