void doneWriting(RegionEntryBuffer buffer) {
    synchronized (this) {
      boolean removed = currentlyWriting.remove(buffer.encodedRegionName);
      assert removed;
    }
    long size = buffer.heapSize();

    synchronized (controller.dataAvailable) {
      totalBuffered -= size;
      // We may unblock writers
      controller.dataAvailable.notifyAll();
    }
  }
Returns RegionEntryBuffer a buffer of edits to be written.
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/EntryBuffers.java