public List < T > purge ( ) { List < T > result = new ArrayList < T > ( ) ; long now = System . currentTimeMillis ( ) ; lock ( ) ; try { for ( T serviceInfo : getServiceInfos ( ) ) { if ( serviceInfo . isExpiredAsOf ( now ) ) { T purged = remove ( serviceInfo . getKey ( ) ) . getPrevious ( ) ; if ( purged != null ) result . add ( purged ) ; } } return result ; } finally { unlock ( ) ; } }
Purges from this cache entries whose registration time plus their lifetime is less than the current time ; that is entries that should have been renewed but for some reason they have not been .