/**
* @return description of what this PackWriter did in order to create the
- * final pack stream. The object is only available to callers after
- * {@link #writePack(ProgressMonitor, ProgressMonitor, OutputStream)}
+ * final pack stream. This should only be invoked after the calls to
+ * create the pack/index/bitmap have completed.
*/
public PackStatistics getStatistics() {
return new PackStatistics(stats);
* the accumulator of the statistics
*/
public ObjectType(ObjectType.Accumulator accumulator) {
+ /*
+ * For efficiency this wraps and serves up the Accumulator object
+ * rather than making a deep clone. Normal usage of PackWriter is to
+ * create a single pack/index/bitmap and only call getStatistics()
+ * after all work is complete.
+ */
objectType = accumulator;
}
* the accumulator of the statistics
*/
public PackStatistics(Accumulator accumulator) {
- // Note: PackStatistics directly serves up the collections in the
- // accumulator.
+ /*
+ * For efficiency this wraps and serves up the Accumulator object rather
+ * than making a deep clone. Normal usage of PackWriter is to create a
+ * single pack/index/bitmap and only call getStatistics() after all work
+ * is complete.
+ */
statistics = accumulator;
}