private void unlockBarrier ( final int size , final Conversation . ConversationType conversationType ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "unlockBarrier" , new Object [ ] { Integer . valueOf ( size ) , conversationType } ) ; synchronized ( barrier ) { queueSize -= size ; // If queue size is now below the maximum size for both data in bytes and number of msgs unlock the barrier (if not already unlocked) if ( queueSize < maxQueueSize && ( maxQueueMsgs == 0 || ( maxQueueMsgs > 0 && queue . size ( ) < maxQueueMsgs ) ) ) { if ( barrier . unlock ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Unlocked the barrier: bytes=" + queueSize + " (" + maxQueueSize + ") msgs=" + queue . size ( ) + " (" + maxQueueMsgs + ")" ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Barrier already unlocked: bytes=" + queueSize + " (" + maxQueueSize + ") msgs=" + queue . size ( ) + " (" + maxQueueMsgs + ")" ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Leaving barrier locked: bytes=" + queueSize + " (" + maxQueueSize + ") msgs=" + queue . size ( ) + " (" + maxQueueMsgs + ")" ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "unlockBarrier" ) ; }
Unlock the barrier .