@Override
	public void run() {
		try {
			while (running && (monitored == null || !monitored.isDone())) {
				logger.info(getMemoryUsageStatsAsString(memoryBean));
				logger.info(getDirectMemoryStatsAsString(directBufferBean));
				logger.info(getMemoryPoolStatsAsString(poolBeans));
				logger.info(getGarbageCollectorStatsAsString(gcBeans));
				
				try {
					Thread.sleep(interval);
				}
				catch (InterruptedException e) {
					if (running) {
						throw e;
					}
				}
			}
		}
		catch (Throwable t) {
			logger.error("Memory logger terminated with exception", t);
		}
	}
@ Override public void run ( ) { try { while ( running && ( monitored == null || ! monitored . isDone ( ) ) ) { logger . info ( getMemoryUsageStatsAsString ( memoryBean ) ) ; logger . info ( getDirectMemoryStatsAsString ( directBufferBean ) ) ; logger . info ( getMemoryPoolStatsAsString ( poolBeans ) ) ; logger . info ( getGarbageCollectorStatsAsString ( gcBeans ) ) ; try { Thread . sleep ( interval ) ; } catch ( InterruptedException e ) { if ( running ) { throw e ; } } } } catch ( Throwable t ) { logger . error ( "Memory logger terminated with exception" , t ) ; } }
------------------------------------------------------------------------