public void registerInvalidations ( String cacheName , Iterator invalidations ) { InvalidationTableList invalidationTableList = getInvalidationTableList ( cacheName ) ; if ( invalidationTableList != null ) { try { invalidationTableList . readWriteLock . writeLock ( ) . lock ( ) ; while ( invalidations . hasNext ( ) ) { try { Object invalidation = invalidations . next ( ) ; if ( invalidation instanceof InvalidateByIdEvent ) { InvalidateByIdEvent idEvent = ( InvalidateByIdEvent ) invalidation ; Object id = idEvent . getId ( ) ; InvalidateByIdEvent oldIdEvent = ( InvalidateByIdEvent ) invalidationTableList . presentIdSet . get ( id ) ; long timeStamp = idEvent . getTimeStamp ( ) ; if ( ( oldIdEvent != null ) && ( oldIdEvent . getTimeStamp ( ) >= timeStamp ) ) { continue ; } invalidationTableList . presentIdSet . put ( id , idEvent ) ; continue ; } InvalidateByTemplateEvent templateEvent = ( InvalidateByTemplateEvent ) invalidation ; String template = templateEvent . getTemplate ( ) ; InvalidateByTemplateEvent oldTemplateEvent = ( InvalidateByTemplateEvent ) invalidationTableList . presentTemplateSet . get ( template ) ; long timeStamp = templateEvent . getTimeStamp ( ) ; if ( ( oldTemplateEvent != null ) && ( oldTemplateEvent . getTimeStamp ( ) >= timeStamp ) ) { continue ; } invalidationTableList . presentTemplateSet . put ( template , templateEvent ) ; } catch ( Exception ex ) { com . ibm . ws . ffdc . FFDCFilter . processException ( ex , "com.ibm.ws.cache.InvalidationAuditDaemon.registerInvalidations" , "126" , this ) ; } } } finally { invalidationTableList . readWriteLock . writeLock ( ) . unlock ( ) ; } } }
This adds id and template invalidations .