final void signalActivateSegment ( ) throws SQLException { /* Note that 'offer' does so only if it can be done immediately without exceeding the queue capacity. The queue capacity is '1', so this means that signals may be ignored. Either way, this message will never block. */ if ( segmentSignalQueue != null ) { segmentSignalQueue . offer ( ACTIVATE_SEGMENT_SIGNAL ) ; } else if ( activeSegments == 0 ) { //Single segment, no monitor, started with the one segment deactivated... synchronized ( this ) { if ( activeSegments == 0 ) { //... and DCL works here because activeSegments is volatile. segments [ 0 ] . activate ( ) ; activeSegments = 1 ; } } } }
Signals that a new segment should be activated .