private void DoAfterFlush()
{
// All ThreadStates should be idle when we are called
System.Diagnostics.Debug.Assert(AllThreadsIdle());
threadBindings.Clear();
waitQueue.Reset();
segment = null;
numDocsInRAM = 0;
nextDocID = 0;
bufferIsFull = false;
flushPending = false;
for (int i = 0; i < threadStates.Length; i++)
threadStates[i].DoAfterFlush();
numBytesUsed = 0;
}