private void flushInternal ( ) throws IOException { isClosed ( ) ; dfsClient . checkOpen ( ) ; long toWaitFor ; synchronized ( this ) { enqueueCurrentPacket ( ) ; toWaitFor = lastQueuedSeqno ; } waitForAckedSeqno ( toWaitFor ) ; }
Waits till all existing data is flushed and confirmations received from datanodes .