public void cacheEntryChanged ( final ChangeEvent event ) { if ( bUpdateChangeListener ) { synchronized ( hsChangeListeners ) { if ( changeListenerCount > 0 ) { currentChangeListeners = new ChangeListener [ changeListenerCount ] ; hsChangeListeners . toArray ( currentChangeListeners ) ; } else { currentChangeListeners = EMPTY_CHANGE_LISTENERS ; } bUpdateChangeListener = false ; } } try { event . m_cacheName = this . cacheNameNonPrefixed ; for ( int i = 0 ; i < currentChangeListeners . length ; i ++ ) { final ChangeListener cl = currentChangeListeners [ i ] ; if ( _async ) { Scheduler . submit ( new Runnable ( ) { @ Override public void run ( ) { cl . cacheEntryChanged ( event ) ; } } ) ; } else { cl . cacheEntryChanged ( event ) ; } } } catch ( Throwable t ) { com . ibm . ws . ffdc . FFDCFilter . processException ( t , "com.ibm.ws.cache.DCEventSource.cacheEntryChanged" , "169" , this ) ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Exception thrown in cacheEntryChanged method of ChangeListener\n" + t . toString ( ) ) ; } } }
The listeners are called when the cacheEntryChange method is invoked .