private static boolean keepMonitoringThreadAlive ( ) { synchronized ( WeakReferenceMonitor . class ) { if ( ! trackedEntries . isEmpty ( ) ) { return true ; } else { logger . debug ( "No entries left to track - stopping reference monitor thread" ) ; monitoringThread = null ; return false ; } } }
Check whether to keep the monitoring thread alive i . e . whether there are still entries being tracked .