public String getReport ( ) { StringBuffer info = new StringBuffer ( ) ; if ( ! isCachingEnabled ( ) ) { info . append ( "cache behaviour: DISABLED\n" ) ; } else if ( isCachingPermanent ( ) ) { info . append ( "cache behaviour: PERMANENT\n" ) ; } else { info . append ( "cache behaviour: NORMAL\n" ) ; } info . append ( "time to live: " + ttlInSeconds + " s\n" ) ; info . append ( "cleanup interval: " + cleanupInterval + " s\n" ) ; info . append ( "cache size: " + data . size ( ) + " objects\n" ) ; info . append ( "cache mirror size: " + mirror . size ( ) + " object(s)\n" ) ; info . append ( "cache hits: " + hits + ' ' ) ; info . append ( "cache misses: " + misses + ' ' ) ; info . append ( "cache unavailable: " + unavailable + ' ' ) ; info . append ( "cache delayed hits: " + delayedHits + ' ' ) ; info . append ( "cache delayed misses: " + delayedMisses + ' ' ) ; info . append ( "next cleanup run: " + new Date ( lastRun . getTime ( ) + ( cleanupInterval * 1000 ) ) + "\n" ) ; return info . toString ( ) ; }
Returns a status report containing behavior and statistics .