public List getValidKeys ( ) { ArrayList validKeys = new ArrayList ( ) ; synchronized ( entryMap ) { Iterator iter = entryMap . entrySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { Map . Entry entry = ( Map . Entry ) iter . next ( ) ; TimedEntry value = ( TimedEntry ) entry . getValue ( ) ; if ( value . isCurrent ( now ) == true ) validKeys . add ( entry . getKey ( ) ) ; } } return validKeys ; }
Get the list of keys for entries that are not expired .