code: public IndexSummary build(IPartitioner partitioner, ReadableBoundary boundary)
      {
          assert entries.length() > 0;
  
          int count = (int) (offsets.length() / 4);
          long entriesLength = entries.length();
          if (boundary != null)
          {
              count = boundary.summaryCount;
              entriesLength = boundary.entriesLength;
          }
  
          int sizeAtFullSampling = (int) Math.ceil(keysWritten / (double) minIndexInterval);
          assert count > 0;
          return new IndexSummary(partitioner, offsets.currentBuffer().sharedCopy(),
                                  count, entries.currentBuffer().sharedCopy(), entriesLength,
                                  sizeAtFullSampling, minIndexInterval, samplingLevel);
      }
docs: multiple invocations of this build method