public final void run ( ) { int partitionCount = partitionService . getPartitionCount ( ) ; latch = new CountDownLatch ( partitionCount ) ; for ( int partitionId = 0 ; partitionId < partitionCount ; partitionId ++ ) { operationExecutor . execute ( new CollectContainerRunnable ( partitionId ) ) ; } try { latch . await ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } }
Collects the containers from the data structure in a thread - safe way .