class MonitoringProcess implements Runnable {

        @Override
        public void run() {<FILL_FUNCTION_BODY>}
    }

            logger.debug("Starting reference monitor thread");
            // Check if there are any tracked entries left.
            while (keepMonitoringThreadAlive()) {
                try {
                    Reference<?> reference = handleQueue.remove();
                    // Stop tracking this reference.
                    ReleaseListener entry = removeEntry(reference);
                    if (entry != null) {
                        // Invoke listener callback.
                        try {
                            entry.released();
                        } catch (Throwable ex) {
                            logger.warning("Reference release listener threw exception", ex);
                        }
                    }
                } catch (InterruptedException ex) {
                    synchronized (WeakReferenceMonitor.class) {
                        monitoringThread = null;
                    }
                    logger.debug("Reference monitor thread interrupted", ex);
                    break;
                }
            }
        
<no_super_class>