private void signalOnSizeThresholdCrossing ( long oldSize , long newSize ) { if ( signalable != null ) { if ( ( oldSize >= lowWaterSizeThreshold ) && ( newSize < lowWaterSizeThreshold ) ) { signalable . signalAll ( ) ; } else if ( ( oldSize >= highWaterSizeThreshold ) && ( newSize < highWaterSizeThreshold ) ) { signalable . signal ( ) ; } } }
Signals the signallable resource if the size crosses a threshold boundary in a downward direction .