private void reloadCacheWithNewValue ( final Long newValue ) { final long newValueAsPrimitive = newValue == null ? getCacheUpdatePeriod ( ) : newValue ; LOG . debug ( "invoking {} listeners" , cacheUpdatePeriodListeners . size ( ) ) ; for ( final PropertyChangeListener listener : cacheUpdatePeriodListeners ) { final PropertyChangeEvent event = new PropertyChangeEvent ( this , "cache" , getCacheUpdatePeriod ( ) , newValueAsPrimitive ) ; listener . propertyChange ( event ) ; } }
Notify all listeners about cachePeriod property changed . If passed newValue is null the oldValue is taken as new value . This is the case when the reloadCache is invoked .