public int getNumberWaiting ( ) { final ReentrantLock lock = this . lock ; lock . lock ( ) ; try { return parties - count ; } finally { lock . unlock ( ) ; } }
Returns the number of parties currently waiting at the barrier . This method is primarily useful for debugging and assertions .