Przeglądaj źródła

Update comments about PackStatistics

Change-Id: I4862932dc38b58cc98400ed584cc506013846065
Signed-off-by: Terry Parker <tparker@google.com>
tags/v4.1.0.201509280440-r
Terry Parker 9 lat temu
rodzic
commit
8b20f2c890

+ 2
- 2
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java Wyświetl plik

@@ -1032,8 +1032,8 @@ public class PackWriter implements AutoCloseable {

/**
* @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);

+ 12
- 2
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackStatistics.java Wyświetl plik

@@ -101,6 +101,12 @@ public class PackStatistics {
* 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;
}

@@ -251,8 +257,12 @@ public class PackStatistics {
* 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;
}


Ładowanie…
Anuluj
Zapisz