public void distribute ( ProcessorListener . Notification < ApiType > obj , boolean isSync ) { lock . readLock ( ) . lock ( ) ; try { if ( isSync ) { for ( ProcessorListener < ApiType > listener : syncingListeners ) { listener . add ( obj ) ; } } else { for ( ProcessorListener < ApiType > listener : listeners ) { listener . add ( obj ) ; } } } finally { lock . readLock ( ) . unlock ( ) ; } }
distribute the object among listeners .