code: public void sync(boolean syncAllSegments)
      {
          CommitLogSegment current = allocator.allocatingFrom();
          for (CommitLogSegment segment : allocator.getActiveSegments())
          {
              if (!syncAllSegments && segment.id > current.id)
                  return;
              segment.sync();
          }
      }
docs: Forces a disk flush on the commit log files that need it.  Blocking.