Fix javadoc in org.eclipse.jgit dfs package
Change-Id: I1f5e3dc3ba34b323ee7244dbefee207ce19e6021
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedEvent.java
index 75ccb07..10d8e89 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedEvent.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedEvent.java
@@ -46,10 +46,10 @@
import org.eclipse.jgit.events.RepositoryEvent;
/**
- * Describes the {@link DfsPackFile} just before its index is loaded. Currently,
- * DfsPackFile directly dispatches the event on
- * {@link org.eclipse.jgit.lib.Repository#getGlobalListenerList}. Which means
- * the call to {@link #getRepository} will always return null.
+ * Describes the {@link org.eclipse.jgit.internal.storage.dfs.DfsPackFile} just
+ * before its index is loaded. Currently, DfsPackFile directly dispatches the
+ * event on {@link org.eclipse.jgit.lib.Repository#getGlobalListenerList}. Which
+ * means the call to {@link #getRepository} will always return null.
*/
public class BeforeDfsPackIndexLoadedEvent
extends RepositoryEvent<BeforeDfsPackIndexLoadedListener> {
@@ -65,16 +65,22 @@ public BeforeDfsPackIndexLoadedEvent(DfsPackFile pack) {
this.pack = pack;
}
- /** @return the PackFile containing the index that will be loaded. */
+ /**
+ * Get the PackFile containing the index that will be loaded.
+ *
+ * @return the PackFile containing the index that will be loaded.
+ */
public DfsPackFile getPackFile() {
return pack;
}
+ /** {@inheritDoc} */
@Override
public Class<BeforeDfsPackIndexLoadedListener> getListenerType() {
return BeforeDfsPackIndexLoadedListener.class;
}
+ /** {@inheritDoc} */
@Override
public void dispatch(BeforeDfsPackIndexLoadedListener listener) {
listener.onBeforeDfsPackIndexLoaded(this);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedListener.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedListener.java
index 9f7f350..517e42b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedListener.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedListener.java
@@ -46,7 +46,8 @@
import org.eclipse.jgit.events.RepositoryListener;
/**
- * Receives {@link BeforeDfsPackIndexLoadedEvent}s.
+ * Receives
+ * {@link org.eclipse.jgit.internal.storage.dfs.BeforeDfsPackIndexLoadedEvent}s.
*/
public interface BeforeDfsPackIndexLoadedListener extends RepositoryListener {
/**
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
index cf86fad..14dc80f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
@@ -56,7 +56,9 @@
import org.eclipse.jgit.internal.storage.pack.PackExt;
/**
- * Caches slices of a {@link BlockBasedFile} in memory for faster read access.
+ * Caches slices of a
+ * {@link org.eclipse.jgit.internal.storage.dfs.BlockBasedFile} in memory for
+ * faster read access.
* <p>
* The DfsBlockCache serves as a Java based "buffer cache", loading segments of
* a BlockBasedFile into the JVM heap prior to use. As JGit often wants to do
@@ -103,7 +105,7 @@ public final class DfsBlockCache {
*
* @param cfg
* the new window cache configuration.
- * @throws IllegalArgumentException
+ * @throws java.lang.IllegalArgumentException
* the cache configuration contains one or more invalid
* settings, usually too low of a limit.
*/
@@ -111,7 +113,11 @@ public static void reconfigure(DfsBlockCacheConfig cfg) {
cache = new DfsBlockCache(cfg);
}
- /** @return the currently active DfsBlockCache. */
+ /**
+ * Get the currently active DfsBlockCache.
+ *
+ * @return the currently active DfsBlockCache.
+ */
public static DfsBlockCache getInstance() {
return cache;
}
@@ -207,17 +213,27 @@ boolean shouldCopyThroughCache(long length) {
return length <= maxStreamThroughCache;
}
- /** @return total number of bytes in the cache, per pack file extension. */
+ /**
+ * Get total number of bytes in the cache, per pack file extension.
+ *
+ * @return total number of bytes in the cache, per pack file extension.
+ */
public long[] getCurrentSize() {
return getStatVals(liveBytes);
}
- /** @return 0..100, defining how full the cache is. */
+ /**
+ * Get 0..100, defining how full the cache is.
+ *
+ * @return 0..100, defining how full the cache is.
+ */
public long getFillPercentage() {
return LongStream.of(getCurrentSize()).sum() * 100 / maxBytes;
}
/**
+ * Get number of requests for items in the cache, per pack file extension.
+ *
* @return number of requests for items in the cache, per pack file
* extension.
*/
@@ -226,6 +242,9 @@ public long getFillPercentage() {
}
/**
+ * Get number of requests for items not in the cache, per pack file
+ * extension.
+ *
* @return number of requests for items not in the cache, per pack file
* extension.
*/
@@ -234,6 +253,8 @@ public long getFillPercentage() {
}
/**
+ * Get total number of requests (hit + miss), per pack file extension.
+ *
* @return total number of requests (hit + miss), per pack file extension.
*/
public long[] getTotalRequestCount() {
@@ -250,7 +271,9 @@ public long getFillPercentage() {
}
/**
- * @return 0..100, defining number of cache hits, per pack file extension.
+ * Get hit ratios
+ *
+ * @return hit ratios
*/
public long[] getHitRatio() {
AtomicLong[] hit = statHit.get();
@@ -272,6 +295,9 @@ public long getFillPercentage() {
}
/**
+ * Get number of evictions performed due to cache being full, per pack file
+ * extension.
+ *
* @return number of evictions performed due to cache being full, per pack
* file extension.
*/
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java
index feadedb..e558a81 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java
@@ -55,7 +55,10 @@
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.Config;
-/** Configuration parameters for {@link DfsBlockCache}. */
+/**
+ * Configuration parameters for
+ * {@link org.eclipse.jgit.internal.storage.dfs.DfsBlockCache}.
+ */
public class DfsBlockCacheConfig {
/** 1024 (number of bytes in one kibibyte/kilobyte) */
public static final int KB = 1024;
@@ -68,7 +71,9 @@ public class DfsBlockCacheConfig {
private double streamRatio;
private int concurrencyLevel;
- /** Create a default configuration. */
+ /**
+ * Create a default configuration.
+ */
public DfsBlockCacheConfig() {
setBlockLimit(32 * MB);
setBlockSize(64 * KB);
@@ -77,6 +82,9 @@ public DfsBlockCacheConfig() {
}
/**
+ * Get maximum number bytes of heap memory to dedicate to caching pack file
+ * data.
+ *
* @return maximum number bytes of heap memory to dedicate to caching pack
* file data. <b>Default is 32 MB.</b>
*/
@@ -85,6 +93,9 @@ public long getBlockLimit() {
}
/**
+ * Set maximum number bytes of heap memory to dedicate to caching pack file
+ * data.
+ *
* @param newLimit
* maximum number bytes of heap memory to dedicate to caching
* pack file data.
@@ -96,6 +107,9 @@ public DfsBlockCacheConfig setBlockLimit(final long newLimit) {
}
/**
+ * Get size in bytes of a single window mapped or read in from the pack
+ * file.
+ *
* @return size in bytes of a single window mapped or read in from the pack
* file. <b>Default is 64 KB.</b>
*/
@@ -104,6 +118,8 @@ public int getBlockSize() {
}
/**
+ * Set size in bytes of a single window read in from the pack file.
+ *
* @param newSize
* size in bytes of a single window read in from the pack file.
* The value must be a power of 2.
@@ -120,6 +136,8 @@ public DfsBlockCacheConfig setBlockSize(final int newSize) {
}
/**
+ * Get the estimated number of threads concurrently accessing the cache.
+ *
* @return the estimated number of threads concurrently accessing the cache.
* <b>Default is 32.</b>
*/
@@ -128,6 +146,8 @@ public int getConcurrencyLevel() {
}
/**
+ * Set the estimated number of threads concurrently accessing the cache.
+ *
* @param newConcurrencyLevel
* the estimated number of threads concurrently accessing the
* cache.
@@ -140,6 +160,9 @@ public DfsBlockCacheConfig setConcurrencyLevel(
}
/**
+ * Get highest percentage of {@link #getBlockLimit()} a single pack can
+ * occupy while being copied by the pack reuse strategy.
+ *
* @return highest percentage of {@link #getBlockLimit()} a single pack can
* occupy while being copied by the pack reuse strategy. <b>Default
* is 0.30, or 30%</b>.
@@ -149,6 +172,8 @@ public double getStreamRatio() {
}
/**
+ * Set percentage of cache to occupy with a copied pack.
+ *
* @param ratio
* percentage of cache to occupy with a copied pack.
* @return {@code this}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsCachedPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsCachedPack.java
index a5308f6..3605236e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsCachedPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsCachedPack.java
@@ -50,7 +50,9 @@
import org.eclipse.jgit.internal.storage.pack.PackOutputStream;
import org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation;
-/** A DfsPackFile available for reuse as-is. */
+/**
+ * A DfsPackFile available for reuse as-is.
+ */
public class DfsCachedPack extends CachedPack {
private final DfsPackFile pack;
@@ -58,21 +60,28 @@ public class DfsCachedPack extends CachedPack {
this.pack = pack;
}
- /** @return the description of the pack. */
+ /**
+ * Get the description of the pack.
+ *
+ * @return the description of the pack.
+ */
public DfsPackDescription getPackDescription() {
return pack.getPackDescription();
}
+ /** {@inheritDoc} */
@Override
public long getObjectCount() throws IOException {
return getPackDescription().getObjectCount();
}
+ /** {@inheritDoc} */
@Override
public long getDeltaCount() throws IOException {
return getPackDescription().getDeltaCount();
}
+ /** {@inheritDoc} */
@Override
public boolean hasObject(ObjectToPack obj, StoredObjectRepresentation rep) {
return ((DfsObjectRepresentation) rep).pack == pack;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsConfig.java
index 696595c..3e2963a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsConfig.java
@@ -49,11 +49,13 @@
import org.eclipse.jgit.lib.StoredConfig;
final class DfsConfig extends StoredConfig {
+ /** {@inheritDoc} */
@Override
public void load() throws IOException, ConfigInvalidException {
clear();
}
+ /** {@inheritDoc} */
@Override
public void save() throws IOException {
// TODO actually store this configuration.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsFsck.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsFsck.java
index c97dd08..985393c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsFsck.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsFsck.java
@@ -65,7 +65,9 @@
import org.eclipse.jgit.revwalk.ObjectWalk;
import org.eclipse.jgit.revwalk.RevObject;
-/** Verify the validity and connectivity of a DFS repository. */
+/**
+ * Verify the validity and connectivity of a DFS repository.
+ */
public class DfsFsck {
private final DfsRepository repo;
private final DfsObjDatabase objdb;
@@ -90,7 +92,7 @@ public DfsFsck(DfsRepository repository) {
* @param pm
* callback to provide progress feedback during the check.
* @return all errors about the repository.
- * @throws IOException
+ * @throws java.io.IOException
* if encounters IO errors during the process.
*/
public FsckError check(ProgressMonitor pm) throws IOException {
@@ -185,10 +187,13 @@ public void setObjectChecker(ObjectChecker objChecker) {
}
/**
+ * Whether fsck should bypass object validity and integrity checks and only
+ * check connectivity.
+ *
* @param connectivityOnly
- * whether fsck should bypass object validity and integrity
- * checks and only check connectivity. The default is
- * {@code false}, meaning to run all checks.
+ * whether fsck should bypass object validity and integrity
+ * checks and only check connectivity. The default is
+ * {@code false}, meaning to run all checks.
*/
public void setConnectivityOnly(boolean connectivityOnly) {
this.connectivityOnly = connectivityOnly;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java
index dc08b1c..637ce16 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java
@@ -93,7 +93,9 @@
import org.eclipse.jgit.util.SystemReader;
import org.eclipse.jgit.util.io.CountingOutputStream;
-/** Repack and garbage collect a repository. */
+/**
+ * Repack and garbage collect a repository.
+ */
public class DfsGarbageCollector {
private final DfsRepository repo;
private final RefDatabase refdb;
@@ -147,12 +149,18 @@ public DfsGarbageCollector(DfsRepository repository) {
packConfig.setIndexVersion(2);
}
- /** @return configuration used to generate the new pack file. */
+ /**
+ * Get configuration used to generate the new pack file.
+ *
+ * @return configuration used to generate the new pack file.
+ */
public PackConfig getPackConfig() {
return packConfig;
}
/**
+ * Set the new configuration to use when creating the pack file.
+ *
* @param newConfig
* the new configuration to use when creating the pack file.
* @return {@code this}
@@ -163,6 +171,8 @@ public DfsGarbageCollector setPackConfig(PackConfig newConfig) {
}
/**
+ * Set configuration to write a reftable.
+ *
* @param cfg
* configuration to write a reftable. Reftable writing is
* disabled (default) when {@code cfg} is {@code null}.
@@ -174,11 +184,14 @@ public DfsGarbageCollector setReftableConfig(ReftableConfig cfg) {
}
/**
+ * Whether the garbage collector should convert references to reftable.
+ *
* @param convert
- * if true, {@link #setReftableConfig(ReftableConfig)} has been
- * set non-null, and a GC reftable doesn't yet exist, the garbage
- * collector will make one by scanning the existing references,
- * and writing a new reftable. Default is {@code true}.
+ * if {@code true}, {@link #setReftableConfig(ReftableConfig)}
+ * has been set non-null, and a GC reftable doesn't yet exist,
+ * the garbage collector will make one by scanning the existing
+ * references, and writing a new reftable. Default is
+ * {@code true}.
* @return {@code this}
*/
public DfsGarbageCollector setConvertToReftable(boolean convert) {
@@ -187,9 +200,13 @@ public DfsGarbageCollector setConvertToReftable(boolean convert) {
}
/**
+ * Whether the garbage collector will include tombstones for deleted
+ * references in the reftable.
+ *
* @param include
- * if true, the garbage collector will include tombstones for
- * deleted references in the reftable. Default is {@code false}.
+ * if {@code true}, the garbage collector will include tombstones
+ * for deleted references in the reftable. Default is
+ * {@code false}.
* @return {@code this}
*/
public DfsGarbageCollector setIncludeDeletes(boolean include) {
@@ -202,9 +219,10 @@ public DfsGarbageCollector setIncludeDeletes(boolean include) {
*
* @param u
* minUpdateIndex for the initial reftable created by scanning
- * {@link DfsRefDatabase#getRefs(String)}. Ignored unless caller
- * has also set {@link #setReftableConfig(ReftableConfig)}.
- * Defaults to {@code 1}. Must be {@code u >= 0}.
+ * {@link org.eclipse.jgit.internal.storage.dfs.DfsRefDatabase#getRefs(String)}.
+ * Ignored unless caller has also set
+ * {@link #setReftableConfig(ReftableConfig)}. Defaults to
+ * {@code 1}. Must be {@code u >= 0}.
* @return {@code this}
*/
public DfsGarbageCollector setReftableInitialMinUpdateIndex(long u) {
@@ -217,9 +235,10 @@ public DfsGarbageCollector setReftableInitialMinUpdateIndex(long u) {
*
* @param u
* maxUpdateIndex for the initial reftable created by scanning
- * {@link DfsRefDatabase#getRefs(String)}. Ignored unless caller
- * has also set {@link #setReftableConfig(ReftableConfig)}.
- * Defaults to {@code 1}. Must be {@code u >= 0}.
+ * {@link org.eclipse.jgit.internal.storage.dfs.DfsRefDatabase#getRefs(String)}.
+ * Ignored unless caller has also set
+ * {@link #setReftableConfig(ReftableConfig)}. Defaults to
+ * {@code 1}. Must be {@code u >= 0}.
* @return {@code this}
*/
public DfsGarbageCollector setReftableInitialMaxUpdateIndex(long u) {
@@ -227,7 +246,12 @@ public DfsGarbageCollector setReftableInitialMaxUpdateIndex(long u) {
return this;
}
- /** @return garbage packs smaller than this size will be repacked. */
+ /**
+ * Get coalesce garbage limit
+ *
+ * @return coalesce garbage limit, packs smaller than this size will be
+ * repacked.
+ */
public long getCoalesceGarbageLimit() {
return coalesceGarbageLimit;
}
@@ -244,7 +268,8 @@ public long getCoalesceGarbageLimit() {
* reading and copying the objects.
* <p>
* If limit is set to 0 the UNREACHABLE_GARBAGE coalesce is disabled.<br>
- * If limit is set to {@link Long#MAX_VALUE}, everything is coalesced.
+ * If limit is set to {@link java.lang.Long#MAX_VALUE}, everything is
+ * coalesced.
* <p>
* Keeping unreachable garbage prevents race conditions with repository
* changes that may suddenly need an object whose only copy was stored in
@@ -260,6 +285,8 @@ public DfsGarbageCollector setCoalesceGarbageLimit(long limit) {
}
/**
+ * Get time to live for garbage packs.
+ *
* @return garbage packs older than this limit (in milliseconds) will be
* pruned as part of the garbage collection process if the value is
* > 0, otherwise garbage packs are retained.
@@ -300,7 +327,7 @@ public DfsGarbageCollector setGarbageTtl(long ttl, TimeUnit unit) {
* @return true if the repack was successful without race conditions. False
* if a race condition was detected and the repack should be run
* again later.
- * @throws IOException
+ * @throws java.io.IOException
* a new pack cannot be created.
*/
public boolean pack(ProgressMonitor pm) throws IOException {
@@ -488,21 +515,30 @@ private static long dayStartInMillis(long timeInMillis) {
return cal.getTimeInMillis();
}
- /** @return all of the source packs that fed into this compaction. */
+ /**
+ * Get all of the source packs that fed into this compaction.
+ *
+ * @return all of the source packs that fed into this compaction.
+ */
public Set<DfsPackDescription> getSourcePacks() {
return toPrune();
}
- /** @return new packs created by this compaction. */
+ /**
+ * Get new packs created by this compaction.
+ *
+ * @return new packs created by this compaction.
+ */
public List<DfsPackDescription> getNewPacks() {
return newPackDesc;
}
/**
- * @return statistics corresponding to the {@link #getNewPacks()}.
+ * Get statistics corresponding to the {@link #getNewPacks()}.
+ * <p>
+ * The elements can be null if the stat is not available for the pack file.
*
- * <p>The elements can be null if the stat is not available for the pack
- * file.
+ * @return statistics corresponding to the {@link #getNewPacks()}.
*/
public List<PackStatistics> getNewPackStatistics() {
return newPackStats;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java
index 2ea5bdb..6d6c534 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java
@@ -92,7 +92,9 @@
import org.eclipse.jgit.util.io.CountingOutputStream;
import org.eclipse.jgit.util.sha1.SHA1;
-/** Inserts objects into the DFS. */
+/**
+ * Inserts objects into the DFS.
+ */
public class DfsInserter extends ObjectInserter {
/** Always produce version 2 indexes, to get CRC data. */
private static final int INDEX_VERSION = 2;
@@ -121,9 +123,12 @@ protected DfsInserter(DfsObjDatabase db) {
}
/**
+ * Check existence
+ *
* @param check
- * if false, will write out possibly-duplicate objects without
- * first checking whether they exist in the repo; default is true.
+ * if {@code false}, will write out possibly-duplicate objects
+ * without first checking whether they exist in the repo; default
+ * is true.
*/
public void checkExisting(boolean check) {
checkExisting = check;
@@ -133,16 +138,19 @@ void setCompressionLevel(int compression) {
this.compression = compression;
}
+ /** {@inheritDoc} */
@Override
public DfsPackParser newPackParser(InputStream in) throws IOException {
return new DfsPackParser(db, this, in);
}
+ /** {@inheritDoc} */
@Override
public ObjectReader newReader() {
return new Reader();
}
+ /** {@inheritDoc} */
@Override
public ObjectId insert(int type, byte[] data, int off, int len)
throws IOException {
@@ -159,6 +167,7 @@ public ObjectId insert(int type, byte[] data, int off, int len)
return endObject(id, offset);
}
+ /** {@inheritDoc} */
@Override
public ObjectId insert(int type, long len, InputStream in)
throws IOException {
@@ -201,6 +210,7 @@ public ObjectId insert(int type, long len, InputStream in)
return buf;
}
+ /** {@inheritDoc} */
@Override
public void flush() throws IOException {
if (packDsc == null)
@@ -228,6 +238,7 @@ public void flush() throws IOException {
clear();
}
+ /** {@inheritDoc} */
@Override
public void close() {
if (packOut != null) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java
index a4ae3e6..42b1a47 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java
@@ -61,7 +61,11 @@
import org.eclipse.jgit.lib.ObjectInserter;
import org.eclipse.jgit.lib.ObjectReader;
-/** Manages objects stored in {@link DfsPackFile} on a storage system. */
+/**
+ * Manages objects stored in
+ * {@link org.eclipse.jgit.internal.storage.dfs.DfsPackFile} on a storage
+ * system.
+ */
public abstract class DfsObjDatabase extends ObjectDatabase {
private static final PackList NO_PACKS = new PackList(
new DfsPackFile[0],
@@ -157,7 +161,6 @@ public static enum PackSource {
*
* @param repository
* repository owning this object database.
- *
* @param options
* how readers should access the object database.
*/
@@ -168,16 +171,22 @@ protected DfsObjDatabase(DfsRepository repository,
this.readerOptions = options;
}
- /** @return configured reader options, such as read-ahead. */
+ /**
+ * Get configured reader options, such as read-ahead.
+ *
+ * @return configured reader options, such as read-ahead.
+ */
public DfsReaderOptions getReaderOptions() {
return readerOptions;
}
+ /** {@inheritDoc} */
@Override
public DfsReader newReader() {
return new DfsReader(this);
}
+ /** {@inheritDoc} */
@Override
public ObjectInserter newInserter() {
return new DfsInserter(this);
@@ -188,7 +197,7 @@ public ObjectInserter newInserter() {
*
* @return list of available packs. The returned array is shared with the
* implementation and must not be modified by the caller.
- * @throws IOException
+ * @throws java.io.IOException
* the pack list cannot be initialized.
*/
public DfsPackFile[] getPacks() throws IOException {
@@ -200,7 +209,7 @@ public ObjectInserter newInserter() {
*
* @return list of available reftables. The returned array is shared with
* the implementation and must not be modified by the caller.
- * @throws IOException
+ * @throws java.io.IOException
* the pack list cannot be initialized.
*/
public DfsReftable[] getReftables() throws IOException {
@@ -213,14 +222,18 @@ public ObjectInserter newInserter() {
* @return list of available packs, with some additional metadata. The
* returned array is shared with the implementation and must not be
* modified by the caller.
- * @throws IOException
+ * @throws java.io.IOException
* the pack list cannot be initialized.
*/
public PackList getPackList() throws IOException {
return scanPacks(NO_PACKS);
}
- /** @return repository owning this object database. */
+ /**
+ * Get repository owning this object database.
+ *
+ * @return repository owning this object database.
+ */
protected DfsRepository getRepository() {
return repository;
}
@@ -267,7 +280,7 @@ public PackList getCurrentPackList() {
* @param avoidUnreachableObjects
* if true, ignore objects that are unreachable.
* @return true if the specified object is stored in this database.
- * @throws IOException
+ * @throws java.io.IOException
* the object store cannot be accessed.
*/
public boolean has(AnyObjectId objectId, boolean avoidUnreachableObjects)
@@ -285,7 +298,7 @@ public boolean has(AnyObjectId objectId, boolean avoidUnreachableObjects)
* where the pack stream is created.
* @return a unique name for the pack file. Must not collide with any other
* pack file name in the same DFS.
- * @throws IOException
+ * @throws java.io.IOException
* a new unique pack description cannot be generated.
*/
protected abstract DfsPackDescription newPack(PackSource source)
@@ -299,7 +312,8 @@ protected abstract DfsPackDescription newPack(PackSource source)
* {@code newPack(source).setEstimatedPackSize(estimatedPackSize)}. But the
* clients can override this method to use the given
* {@code estomatedPackSize} value more efficiently in the process of
- * creating a new {@link DfsPackDescription} object.
+ * creating a new
+ * {@link org.eclipse.jgit.internal.storage.dfs.DfsPackDescription} object.
*
* @param source
* where the pack stream is created.
@@ -307,7 +321,7 @@ protected abstract DfsPackDescription newPack(PackSource source)
* the estimated size of the pack.
* @return a unique name for the pack file. Must not collide with any other
* pack file name in the same DFS.
- * @throws IOException
+ * @throws java.io.IOException
* a new unique pack description cannot be generated.
*/
protected DfsPackDescription newPack(PackSource source,
@@ -338,7 +352,7 @@ protected DfsPackDescription newPack(PackSource source,
* description of the new packs.
* @param replaces
* if not null, list of packs to remove.
- * @throws IOException
+ * @throws java.io.IOException
* the packs cannot be committed. On failure a rollback must
* also be attempted by the caller.
*/
@@ -352,12 +366,11 @@ protected void commitPack(Collection<DfsPackDescription> desc,
* Implementation of pack commit.
*
* @see #commitPack(Collection, Collection)
- *
* @param desc
* description of the new packs.
* @param replaces
* if not null, list of packs to remove.
- * @throws IOException
+ * @throws java.io.IOException
* the packs cannot be committed.
*/
protected abstract void commitPackImpl(Collection<DfsPackDescription> desc,
@@ -388,7 +401,7 @@ protected abstract void commitPackImpl(Collection<DfsPackDescription> desc,
* DfsPackDescription objects.
*
* @return available packs. May be empty if there are no packs.
- * @throws IOException
+ * @throws java.io.IOException
* the packs cannot be listed and the object database is not
* functional to the caller.
*/
@@ -405,9 +418,9 @@ protected abstract void commitPackImpl(Collection<DfsPackDescription> desc,
* @param ext
* file extension that will be read i.e "pack" or "idx".
* @return channel to read the file.
- * @throws FileNotFoundException
+ * @throws java.io.FileNotFoundException
* the file does not exist.
- * @throws IOException
+ * @throws java.io.IOException
* the file cannot be opened.
*/
protected abstract ReadableChannel openFile(
@@ -424,7 +437,7 @@ protected abstract ReadableChannel openFile(
* @param ext
* file extension that will be written i.e "pack" or "idx".
* @return channel to write the file.
- * @throws IOException
+ * @throws java.io.IOException
* the file cannot be opened.
*/
protected abstract DfsOutputStream writeFile(
@@ -565,7 +578,11 @@ private static Map<DfsPackDescription, DfsReftable> reftableMap(PackList old) {
return forReuse;
}
- /** @return comparator to sort {@link DfsReftable} by priority. */
+ /**
+ * Get comparator to sort {@link DfsReftable} by priority.
+ *
+ * @return comparator to sort {@link DfsReftable} by priority.
+ */
protected Comparator<DfsReftable> reftableComparator() {
return (fa, fb) -> {
DfsPackDescription a = fa.getPackDescription();
@@ -593,11 +610,14 @@ static int category(DfsPackDescription d) {
return s != null ? s.category : 0;
}
- /** Clears the cached list of packs, forcing them to be scanned again. */
+ /**
+ * Clears the cached list of packs, forcing them to be scanned again.
+ */
protected void clearCache() {
packList.set(NO_PACKS);
}
+ /** {@inheritDoc} */
@Override
public void close() {
packList.set(NO_PACKS);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java
index ddcfff6..1e388fd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java
@@ -57,21 +57,25 @@ class DfsObjectRepresentation extends StoredObjectRepresentation {
this.pack = pack;
}
+ /** {@inheritDoc} */
@Override
public int getFormat() {
return format;
}
+ /** {@inheritDoc} */
@Override
public int getWeight() {
return (int) Math.min(length, Integer.MAX_VALUE);
}
+ /** {@inheritDoc} */
@Override
public ObjectId getDeltaBase() {
return baseId;
}
+ /** {@inheritDoc} */
@Override
public boolean wasDeltaAttempted() {
switch (pack.getPackDescription().getPackSource()) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java
index ff270bf..3a04d70 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java
@@ -72,12 +72,14 @@ final void setFound() {
setExtendedFlag(FLAG_FOUND);
}
+ /** {@inheritDoc} */
@Override
protected void clearReuseAsIs() {
super.clearReuseAsIs();
pack = null;
}
+ /** {@inheritDoc} */
@Override
public void select(StoredObjectRepresentation ref) {
DfsObjectRepresentation ptr = (DfsObjectRepresentation) ref;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsOutputStream.java
index ef3173e..c286570 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsOutputStream.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsOutputStream.java
@@ -72,11 +72,13 @@ public int blockSize() {
return 0;
}
+ /** {@inheritDoc} */
@Override
public void write(int b) throws IOException {
write(new byte[] { (byte) b });
}
+ /** {@inheritDoc} */
@Override
public abstract void write(byte[] buf, int off, int len) throws IOException;
@@ -91,7 +93,7 @@ public void write(int b) throws IOException {
* buffer to populate. Up to {@code buf.remaining()} bytes will
* be read from {@code position}.
* @return number of bytes actually read.
- * @throws IOException
+ * @throws java.io.IOException
* reading is not supported, or the read cannot be performed due
* to DFS errors.
*/
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java
index 14f182c..ab76332 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java
@@ -126,6 +126,8 @@ public DfsPackCompactor(DfsRepository repository) {
}
/**
+ * Set configuration to write a reftable.
+ *
* @param cfg
* configuration to write a reftable. Reftable compacting is
* disabled (default) when {@code cfg} is {@code null}.
@@ -172,7 +174,7 @@ public DfsPackCompactor add(DfsReftable table) {
* ones are omitted.
*
* @return {@code this}
- * @throws IOException
+ * @throws java.io.IOException
* existing packs cannot be read.
*/
public DfsPackCompactor autoAdd() throws IOException {
@@ -215,7 +217,7 @@ public DfsPackCompactor exclude(ObjectIdSet set) {
* @param pack
* objects to not include.
* @return {@code this}.
- * @throws IOException
+ * @throws java.io.IOException
* pack index cannot be loaded.
*/
public DfsPackCompactor exclude(DfsPackFile pack) throws IOException {
@@ -232,7 +234,7 @@ public DfsPackCompactor exclude(DfsPackFile pack) throws IOException {
* @param pm
* progress monitor to receive updates on as packing may take a
* while, depending on the size of the repository.
- * @throws IOException
+ * @throws java.io.IOException
* the packs cannot be compacted.
*/
public void compact(ProgressMonitor pm) throws IOException {
@@ -331,7 +333,11 @@ private void initOutDesc(DfsObjDatabase objdb) throws IOException {
}
}
- /** @return all of the source packs that fed into this compaction. */
+ /**
+ * Get all of the source packs that fed into this compaction.
+ *
+ * @return all of the source packs that fed into this compaction.
+ */
public Collection<DfsPackDescription> getSourcePacks() {
Set<DfsPackDescription> src = new HashSet<>();
for (DfsPackFile pack : srcPacks) {
@@ -343,7 +349,11 @@ public Collection<DfsPackDescription> getSourcePacks() {
return src;
}
- /** @return new packs created by this compaction. */
+ /**
+ * Get new packs created by this compaction.
+ *
+ * @return new packs created by this compaction.
+ */
public List<DfsPackDescription> getNewPacks() {
return outDesc != null
? Collections.singletonList(outDesc)
@@ -351,9 +361,11 @@ public List<DfsPackDescription> getNewPacks() {
}
/**
+ * Get statistics corresponding to the {@link #getNewPacks()}.
+ * May be null if statistics are not available.
+ *
* @return statistics corresponding to the {@link #getNewPacks()}.
*
- * <p>The element may be null if the stat is not available.
*/
public List<PackStatistics> getNewPackStatistics() {
return outDesc != null
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackDescription.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackDescription.java
index 4ea70a8..45eb7b0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackDescription.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackDescription.java
@@ -104,7 +104,11 @@ public DfsPackDescription(DfsRepositoryDescription repoDesc, String name) {
blockSizeMap = new int[extCnt];
}
- /** @return description of the repository. */
+ /**
+ * Get description of the repository.
+ *
+ * @return description of the repository.
+ */
public DfsRepositoryDescription getRepositoryDescription() {
return repoDesc;
}
@@ -120,15 +124,19 @@ public void addFileExt(PackExt ext) {
}
/**
+ * Whether the pack file extension is known to exist.
+ *
* @param ext
* the file extension
- * @return whether the pack file extensions is known to exist.
+ * @return whether the pack file extension is known to exist.
*/
public boolean hasFileExt(PackExt ext) {
return (extensions & ext.getBit()) != 0;
}
/**
+ * Get file name
+ *
* @param ext
* the file extension
* @return name of the file.
@@ -138,6 +146,8 @@ public String getFileName(PackExt ext) {
}
/**
+ * Get cache key for use by the block cache.
+ *
* @param ext
* the file extension.
* @return cache key for use by the block cache.
@@ -147,12 +157,18 @@ public DfsStreamKey getStreamKey(PackExt ext) {
ext);
}
- /** @return the source of the pack. */
+ /**
+ * Get the source of the pack.
+ *
+ * @return the source of the pack.
+ */
public PackSource getPackSource() {
return packSource;
}
/**
+ * Set the source of the pack.
+ *
* @param source
* the source of the pack.
* @return {@code this}
@@ -162,12 +178,18 @@ public DfsPackDescription setPackSource(PackSource source) {
return this;
}
- /** @return time the pack was created, in milliseconds. */
+ /**
+ * Get time the pack was created, in milliseconds.
+ *
+ * @return time the pack was created, in milliseconds.
+ */
public long getLastModified() {
return lastModified;
}
/**
+ * Set time the pack was created, in milliseconds.
+ *
* @param timeMillis
* time the pack was created, in milliseconds. 0 if not known.
* @return {@code this}
@@ -177,14 +199,20 @@ public DfsPackDescription setLastModified(long timeMillis) {
return this;
}
- /** @return minUpdateIndex for the reftable, if present. */
+ /**
+ * Get minUpdateIndex for the reftable, if present.
+ *
+ * @return minUpdateIndex for the reftable, if present.
+ */
public long getMinUpdateIndex() {
return minUpdateIndex;
}
/**
+ * Set minUpdateIndex for the reftable.
+ *
* @param min
- * minUpdateIndex for the reftable, or 0.
+ * minUpdateIndex for the reftable.
* @return {@code this}
*/
public DfsPackDescription setMinUpdateIndex(long min) {
@@ -192,14 +220,20 @@ public DfsPackDescription setMinUpdateIndex(long min) {
return this;
}
- /** @return maxUpdateIndex for the reftable, if present. */
+ /**
+ * Get maxUpdateIndex for the reftable, if present.
+ *
+ * @return maxUpdateIndex for the reftable, if present.
+ */
public long getMaxUpdateIndex() {
return maxUpdateIndex;
}
/**
+ * Set maxUpdateIndex for the reftable.
+ *
* @param max
- * maxUpdateIndex for the reftable, or 0.
+ * maxUpdateIndex for the reftable.
* @return {@code this}
*/
public DfsPackDescription setMaxUpdateIndex(long max) {
@@ -208,6 +242,8 @@ public DfsPackDescription setMaxUpdateIndex(long max) {
}
/**
+ * Set size of the file in bytes.
+ *
* @param ext
* the file extension.
* @param bytes
@@ -225,6 +261,8 @@ public DfsPackDescription setFileSize(PackExt ext, long bytes) {
}
/**
+ * Get size of the file, in bytes.
+ *
* @param ext
* the file extension.
* @return size of the file, in bytes. If 0 the file size is not yet known.
@@ -235,6 +273,8 @@ public long getFileSize(PackExt ext) {
}
/**
+ * Get blockSize of the file, in bytes.
+ *
* @param ext
* the file extension.
* @return blockSize of the file, in bytes. If 0 the blockSize size is not
@@ -246,6 +286,8 @@ public int getBlockSize(PackExt ext) {
}
/**
+ * Set blockSize of the file, in bytes.
+ *
* @param ext
* the file extension.
* @param blockSize
@@ -263,6 +305,8 @@ public DfsPackDescription setBlockSize(PackExt ext, int blockSize) {
}
/**
+ * Set estimated size of the .pack file in bytes.
+ *
* @param estimatedPackSize
* estimated size of the .pack file in bytes. If 0 the pack file
* size is unknown.
@@ -274,6 +318,8 @@ public DfsPackDescription setEstimatedPackSize(long estimatedPackSize) {
}
/**
+ * Get estimated size of the .pack file in bytes.
+ *
* @return estimated size of the .pack file in bytes. If 0 the pack file
* size is unknown.
*/
@@ -281,12 +327,18 @@ public long getEstimatedPackSize() {
return estimatedPackSize;
}
- /** @return number of objects in the pack. */
+ /**
+ * Get number of objects in the pack.
+ *
+ * @return number of objects in the pack.
+ */
public long getObjectCount() {
return objectCount;
}
/**
+ * Set number of objects in the pack.
+ *
* @param cnt
* number of objects in the pack.
* @return {@code this}
@@ -296,12 +348,18 @@ public DfsPackDescription setObjectCount(long cnt) {
return this;
}
- /** @return number of delta compressed objects in the pack. */
+ /**
+ * Get number of delta compressed objects in the pack.
+ *
+ * @return number of delta compressed objects in the pack.
+ */
public long getDeltaCount() {
return deltaCount;
}
/**
+ * Set number of delta compressed objects in the pack.
+ *
* @param cnt
* number of delta compressed objects in the pack.
* @return {@code this}
@@ -312,6 +370,8 @@ public DfsPackDescription setDeltaCount(long cnt) {
}
/**
+ * Get statistics from PackWriter, if the pack was built with it.
+ *
* @return statistics from PackWriter, if the pack was built with it.
* Generally this is only available for packs created by
* DfsGarbageCollector or DfsPackCompactor, and only when the pack
@@ -329,7 +389,11 @@ DfsPackDescription setPackStats(PackStatistics stats) {
return this;
}
- /** @return stats from the sibling reftable, if created. */
+ /**
+ * Get stats from the sibling reftable, if created.
+ *
+ * @return stats from the sibling reftable, if created.
+ */
public ReftableWriter.Stats getReftableStats() {
return refStats;
}
@@ -353,12 +417,18 @@ public DfsPackDescription clearPackStats() {
return this;
}
- /** @return the version of the index file written. */
+ /**
+ * Get the version of the index file written.
+ *
+ * @return the version of the index file written.
+ */
public int getIndexVersion() {
return indexVersion;
}
/**
+ * Set the version of the index file written.
+ *
* @param version
* the version of the index file written.
* @return {@code this}
@@ -368,11 +438,13 @@ public DfsPackDescription setIndexVersion(int version) {
return this;
}
+ /** {@inheritDoc} */
@Override
public int hashCode() {
return packName.hashCode();
}
+ /** {@inheritDoc} */
@Override
public boolean equals(Object b) {
if (b instanceof DfsPackDescription) {
@@ -384,15 +456,14 @@ public boolean equals(Object b) {
}
/**
+ * {@inheritDoc}
+ * <p>
* Sort packs according to the optimal lookup ordering.
* <p>
* This method tries to position packs in the order readers should examine
* them when looking for objects by SHA-1. The default tries to sort packs
* with more recent modification dates before older packs, and packs with
* fewer objects before packs with more objects.
- *
- * @param b
- * the other pack.
*/
@Override
public int compareTo(DfsPackDescription b) {
@@ -438,6 +509,7 @@ static boolean isGC(PackSource s) {
}
}
+ /** {@inheritDoc} */
@Override
public String toString() {
return getFileName(PackExt.PACK);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
index 64b51b1..54b0cb5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
@@ -133,12 +133,18 @@ public final class DfsPackFile extends BlockBasedFile {
length = sz > 0 ? sz : -1;
}
- /** @return description that was originally used to configure this pack file. */
+ /**
+ * Get description that was originally used to configure this pack file.
+ *
+ * @return description that was originally used to configure this pack file.
+ */
public DfsPackDescription getPackDescription() {
return desc;
}
/**
+ * Whether the pack index file is loaded and cached in memory.
+ *
* @return whether the pack index file is loaded and cached in memory.
*/
public boolean isIndexLoaded() {
@@ -160,7 +166,7 @@ void setPackIndex(PackIndex idx) {
* reader context to support reading from the backing store if
* the index is not already loaded in memory.
* @return the PackIndex.
- * @throws IOException
+ * @throws java.io.IOException
* the pack index is not available, or is corrupt.
*/
public PackIndex getPackIndex(DfsReader ctx) throws IOException {
@@ -350,7 +356,7 @@ PackReverseIndex getReverseIdx(DfsReader ctx) throws IOException {
* @param id
* object to be located.
* @return true if the object exists in this pack; false if it does not.
- * @throws IOException
+ * @throws java.io.IOException
* the pack index is not available, or is corrupt.
*/
public boolean hasObject(DfsReader ctx, AnyObjectId id) throws IOException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java
index fd99db1..3a30d7d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java
@@ -63,7 +63,9 @@
import org.eclipse.jgit.transport.PackParser;
import org.eclipse.jgit.transport.PackedObjectInfo;
-/** Parses a pack stream into the DFS, by creating a new pack and index. */
+/**
+ * Parses a pack stream into the DFS, by creating a new pack and index.
+ */
public class DfsPackParser extends PackParser {
private final DfsObjDatabase objdb;
@@ -132,6 +134,7 @@ protected DfsPackParser(DfsObjDatabase db, DfsInserter ins, InputStream in) {
this.packDigest = Constants.newMessageDigest();
}
+ /** {@inheritDoc} */
@Override
public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving)
throws IOException {
@@ -193,11 +196,16 @@ public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving)
}
}
- /** @return description of the imported pack, if one was made. */
+ /**
+ * Get description of the imported pack, if one was made.
+ *
+ * @return description of the imported pack, if one was made.
+ */
public DfsPackDescription getPackDescription() {
return packDsc;
}
+ /** {@inheritDoc} */
@Override
protected void onPackHeader(long objectCount) throws IOException {
if (objectCount == 0) {
@@ -219,29 +227,34 @@ else if (size < blockCache.getBlockSize())
currBuf = new byte[blockSize];
}
+ /** {@inheritDoc} */
@Override
protected void onBeginWholeObject(long streamPosition, int type,
long inflatedSize) throws IOException {
crc.reset();
}
+ /** {@inheritDoc} */
@Override
protected void onEndWholeObject(PackedObjectInfo info) throws IOException {
info.setCRC((int) crc.getValue());
}
+ /** {@inheritDoc} */
@Override
protected void onBeginOfsDelta(long streamPosition,
long baseStreamPosition, long inflatedSize) throws IOException {
crc.reset();
}
+ /** {@inheritDoc} */
@Override
protected void onBeginRefDelta(long streamPosition, AnyObjectId baseId,
long inflatedSize) throws IOException {
crc.reset();
}
+ /** {@inheritDoc} */
@Override
protected UnresolvedDelta onEndDelta() throws IOException {
UnresolvedDelta delta = new UnresolvedDelta();
@@ -249,24 +262,28 @@ protected UnresolvedDelta onEndDelta() throws IOException {
return delta;
}
+ /** {@inheritDoc} */
@Override
protected void onInflatedObjectData(PackedObjectInfo obj, int typeCode,
byte[] data) throws IOException {
// DfsPackParser ignores this event.
}
+ /** {@inheritDoc} */
@Override
protected void onObjectHeader(Source src, byte[] raw, int pos, int len)
throws IOException {
crc.update(raw, pos, len);
}
+ /** {@inheritDoc} */
@Override
protected void onObjectData(Source src, byte[] raw, int pos, int len)
throws IOException {
crc.update(raw, pos, len);
}
+ /** {@inheritDoc} */
@Override
protected void onStoreStream(byte[] raw, int pos, int len)
throws IOException {
@@ -313,6 +330,7 @@ private DfsBlock flushBlock() throws IOException {
return v;
}
+ /** {@inheritDoc} */
@Override
protected void onPackFooter(byte[] hash) throws IOException {
// The base class will validate the original hash matches
@@ -322,6 +340,7 @@ protected void onPackFooter(byte[] hash) throws IOException {
packHash = hash;
}
+ /** {@inheritDoc} */
@Override
protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj,
ObjectTypeAndSize info) throws IOException {
@@ -330,6 +349,7 @@ protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj,
return readObjectHeader(info);
}
+ /** {@inheritDoc} */
@Override
protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta,
ObjectTypeAndSize info) throws IOException {
@@ -338,6 +358,7 @@ protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta,
return readObjectHeader(info);
}
+ /** {@inheritDoc} */
@Override
protected int readDatabase(byte[] dst, int pos, int cnt) throws IOException {
if (cnt == 0)
@@ -393,11 +414,13 @@ private long toBlockStart(long pos) {
return (pos / blockSize) * blockSize;
}
+ /** {@inheritDoc} */
@Override
protected boolean checkCRC(int oldCRC) {
return oldCRC == (int) crc.getValue();
}
+ /** {@inheritDoc} */
@Override
protected boolean onAppendBase(final int typeCode, final byte[] data,
final PackedObjectInfo info) throws IOException {
@@ -437,6 +460,7 @@ protected boolean onAppendBase(final int typeCode, final byte[] data,
return true;
}
+ /** {@inheritDoc} */
@Override
protected void onEndThinPack() throws IOException {
// Normally when a thin pack is closed the pack header gets
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedEvent.java
index 14d67c0..d9fc71f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedEvent.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedEvent.java
@@ -45,14 +45,19 @@
import org.eclipse.jgit.events.RepositoryEvent;
-/** Describes a change to the list of packs in a {@link DfsRepository}. */
+/**
+ * Describes a change to the list of packs in a
+ * {@link org.eclipse.jgit.internal.storage.dfs.DfsRepository}.
+ */
public class DfsPacksChangedEvent
extends RepositoryEvent<DfsPacksChangedListener> {
+ /** {@inheritDoc} */
@Override
public Class<DfsPacksChangedListener> getListenerType() {
return DfsPacksChangedListener.class;
}
+ /** {@inheritDoc} */
@Override
public void dispatch(DfsPacksChangedListener listener) {
listener.onPacksChanged(this);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedListener.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedListener.java
index 324626c..3ea8213 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedListener.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedListener.java
@@ -45,7 +45,9 @@
import org.eclipse.jgit.events.RepositoryListener;
-/** Receives {@link DfsPacksChangedEvent}s. */
+/**
+ * Receives {@link org.eclipse.jgit.internal.storage.dfs.DfsPacksChangedEvent}s.
+ */
public interface DfsPacksChangedListener extends RepositoryListener {
/**
* Invoked when all packs in a repository are listed.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
index 3c84220..27a7992 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
@@ -92,8 +92,8 @@
/**
* Reader to access repository content through.
* <p>
- * See the base {@link ObjectReader} documentation for details. Notably, a
- * reader is not thread safe.
+ * See the base {@link org.eclipse.jgit.lib.ObjectReader} documentation for
+ * details. Notably, a reader is not thread safe.
*/
public class DfsReader extends ObjectReader implements ObjectReuseAsIs {
private static final int MAX_RESOLVE_MATCHES = 256;
@@ -133,16 +133,19 @@ DeltaBaseCache getDeltaBaseCache() {
return baseCache;
}
+ /** {@inheritDoc} */
@Override
public ObjectReader newReader() {
return db.newReader();
}
+ /** {@inheritDoc} */
@Override
public void setAvoidUnreachableObjects(boolean avoid) {
avoidUnreachable = avoid;
}
+ /** {@inheritDoc} */
@Override
public BitmapIndex getBitmapIndex() throws IOException {
for (DfsPackFile pack : db.getPacks()) {
@@ -153,6 +156,7 @@ public BitmapIndex getBitmapIndex() throws IOException {
return null;
}
+ /** {@inheritDoc} */
@Override
public Collection<CachedPack> getCachedPacksAndUpdate(
BitmapBuilder needBitmap) throws IOException {
@@ -165,6 +169,7 @@ public Collection<CachedPack> getCachedPacksAndUpdate(
return Collections.emptyList();
}
+ /** {@inheritDoc} */
@Override
public Collection<ObjectId> resolve(AbbreviatedObjectId id)
throws IOException {
@@ -193,6 +198,7 @@ private void resolveImpl(PackList packList, AbbreviatedObjectId id,
}
}
+ /** {@inheritDoc} */
@Override
public boolean has(AnyObjectId objectId) throws IOException {
if (last != null
@@ -222,6 +228,7 @@ private boolean hasImpl(PackList packList, AnyObjectId objectId)
return false;
}
+ /** {@inheritDoc} */
@Override
public ObjectLoader open(AnyObjectId objectId, int typeHint)
throws MissingObjectException, IncorrectObjectTypeException,
@@ -276,6 +283,7 @@ private ObjectLoader openImpl(PackList packList, AnyObjectId objectId)
return null;
}
+ /** {@inheritDoc} */
@Override
public Set<ObjectId> getShallowCommits() {
return Collections.emptySet();
@@ -385,6 +393,7 @@ private boolean skipGarbagePack(DfsPackFile pack) {
return avoidUnreachable && pack.isGarbage();
}
+ /** {@inheritDoc} */
@Override
public <T extends ObjectId> AsyncObjectLoaderQueue<T> open(
Iterable<T> objectIds, final boolean reportMissing) {
@@ -444,6 +453,7 @@ public void release() {
};
}
+ /** {@inheritDoc} */
@Override
public <T extends ObjectId> AsyncObjectSizeQueue<T> getObjectSize(
Iterable<T> objectIds, final boolean reportMissing) {
@@ -505,6 +515,7 @@ public void release() {
};
}
+ /** {@inheritDoc} */
@Override
public long getObjectSize(AnyObjectId objectId, int typeHint)
throws MissingObjectException, IncorrectObjectTypeException,
@@ -550,6 +561,7 @@ private long getObjectSizeImpl(PackList packList, AnyObjectId objectId)
return -1;
}
+ /** {@inheritDoc} */
@Override
public DfsObjectToPack newObjectToPack(AnyObjectId objectId, int type) {
return new DfsObjectToPack(objectId, type);
@@ -631,6 +643,7 @@ private List<DfsObjectToPack> findAllFromPack(DfsPackFile pack,
return tmp;
}
+ /** {@inheritDoc} */
@Override
public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp,
boolean validate) throws IOException,
@@ -639,6 +652,7 @@ public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp,
src.pack.copyAsIs(out, src, validate, this);
}
+ /** {@inheritDoc} */
@Override
public void writeObjects(PackOutputStream out, List<ObjectToPack> list)
throws IOException {
@@ -646,6 +660,7 @@ public void writeObjects(PackOutputStream out, List<ObjectToPack> list)
out.writeObject(otp);
}
+ /** {@inheritDoc} */
@Override
public void copyPackAsIs(PackOutputStream out, CachedPack pack)
throws IOException {
@@ -771,12 +786,20 @@ void unpin() {
block = null;
}
- /** @return IO statistics accumulated by this reader. */
+ /**
+ * Get IO statistics accumulated by this reader.
+ *
+ * @return IO statistics accumulated by this reader.
+ */
public DfsReaderIoStats getIoStats() {
return new DfsReaderIoStats(stats);
}
- /** Release the current window cursor. */
+ /**
+ * {@inheritDoc}
+ * <p>
+ * Release the current window cursor.
+ */
@Override
public void close() {
last = null;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java
index 9a174c8..cf925c9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java
@@ -43,7 +43,9 @@
package org.eclipse.jgit.internal.storage.dfs;
-/** IO statistics for a {@link DfsReader}. */
+/**
+ * IO statistics for a {@link org.eclipse.jgit.internal.storage.dfs.DfsReader}.
+ */
public class DfsReaderIoStats {
/** POJO to accumulate IO statistics. */
public static class Accumulator {
@@ -87,52 +89,92 @@ public static class Accumulator {
this.stats = stats;
}
- /** @return number of times the reader explicitly called scanPacks. */
+ /**
+ * Get number of times the reader explicitly called scanPacks.
+ *
+ * @return number of times the reader explicitly called scanPacks.
+ */
public long getScanPacks() {
return stats.scanPacks;
}
- /** @return total number of complete pack indexes read into memory. */
+ /**
+ * Get total number of complete pack indexes read into memory.
+ *
+ * @return total number of complete pack indexes read into memory.
+ */
public long getReadPackIndexCount() {
return stats.readIdx;
}
- /** @return total number of complete bitmap indexes read into memory. */
+ /**
+ * Get total number of complete bitmap indexes read into memory.
+ *
+ * @return total number of complete bitmap indexes read into memory.
+ */
public long getReadBitmapIndexCount() {
return stats.readBitmap;
}
- /** @return total number of bytes read from indexes. */
+ /**
+ * Get total number of bytes read from indexes.
+ *
+ * @return total number of bytes read from indexes.
+ */
public long getReadIndexBytes() {
return stats.readIdxBytes;
}
- /** @return total microseconds spent reading pack or bitmap indexes. */
+ /**
+ * Get total microseconds spent reading pack or bitmap indexes.
+ *
+ * @return total microseconds spent reading pack or bitmap indexes.
+ */
public long getReadIndexMicros() {
return stats.readIdxMicros;
}
- /** @return total number of block cache hits. */
+ /**
+ * Get total number of block cache hits.
+ *
+ * @return total number of block cache hits.
+ */
public long getBlockCacheHits() {
return stats.blockCacheHit;
}
- /** @return total number of discrete blocks read from pack file(s). */
+ /**
+ * Get total number of discrete blocks read from pack file(s).
+ *
+ * @return total number of discrete blocks read from pack file(s).
+ */
public long getReadBlocksCount() {
return stats.readBlock;
}
- /** @return total number of compressed bytes read as block sized units. */
+ /**
+ * Get total number of compressed bytes read as block sized units.
+ *
+ * @return total number of compressed bytes read as block sized units.
+ */
public long getReadBlocksBytes() {
return stats.readBlockBytes;
}
- /** @return total microseconds spent reading blocks. */
+ /**
+ * Get total microseconds spent reading blocks.
+ *
+ * @return total microseconds spent reading blocks.
+ */
public long getReadBlocksMicros() {
return stats.readBlockMicros;
}
- /** @return total number of bytes decompressed. */
+ /**
+ * Get total number of bytes decompressed.
+ *
+ * @return total number of bytes decompressed.
+ */
public long getInflatedBytes() {
return stats.inflatedBytes;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderOptions.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderOptions.java
index d07c13d..bf14d18 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderOptions.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderOptions.java
@@ -52,7 +52,9 @@
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.storage.pack.PackConfig;
-/** Options controlling how objects are read from a DFS stored repository. */
+/**
+ * Options controlling how objects are read from a DFS stored repository.
+ */
public class DfsReaderOptions {
/** 1024 (number of bytes in one kibibyte/kilobyte) */
public static final int KiB = 1024;
@@ -65,13 +67,19 @@ public class DfsReaderOptions {
private int streamPackBufferSize;
- /** Create a default reader configuration. */
+ /**
+ * Create a default reader configuration.
+ */
public DfsReaderOptions() {
setDeltaBaseCacheLimit(10 * MiB);
setStreamFileThreshold(PackConfig.DEFAULT_BIG_FILE_THRESHOLD);
}
- /** @return maximum number of bytes to hold in per-reader DeltaBaseCache. */
+ /**
+ * Get maximum number of bytes to hold in per-reader DeltaBaseCache.
+ *
+ * @return maximum number of bytes to hold in per-reader DeltaBaseCache.
+ */
public int getDeltaBaseCacheLimit() {
return deltaBaseCacheLimit;
}
@@ -88,12 +96,18 @@ public DfsReaderOptions setDeltaBaseCacheLimit(int maxBytes) {
return this;
}
- /** @return the size threshold beyond which objects must be streamed. */
+ /**
+ * Get the size threshold beyond which objects must be streamed.
+ *
+ * @return the size threshold beyond which objects must be streamed.
+ */
public int getStreamFileThreshold() {
return streamFileThreshold;
}
/**
+ * Set new byte limit for objects that must be streamed.
+ *
* @param newLimit
* new byte limit for objects that must be streamed. Objects
* smaller than this size can be obtained as a contiguous byte
@@ -107,6 +121,9 @@ public DfsReaderOptions setStreamFileThreshold(final int newLimit) {
}
/**
+ * Get number of bytes to use for buffering when streaming a pack file
+ * during copying.
+ *
* @return number of bytes to use for buffering when streaming a pack file
* during copying. If 0 the block size of the pack is used.
*/
@@ -115,6 +132,9 @@ public int getStreamPackBufferSize() {
}
/**
+ * Set new buffer size in bytes for buffers used when streaming pack files
+ * during copying.
+ *
* @param bufsz
* new buffer size in bytes for buffers used when streaming pack
* files during copying.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java
index d11286a..a884346 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java
@@ -64,7 +64,10 @@
import org.eclipse.jgit.util.RefList;
import org.eclipse.jgit.util.RefMap;
-/** */
+/**
+ * Abstract DfsRefDatabase class.
+ *
+ */
public abstract class DfsRefDatabase extends RefDatabase {
private final DfsRepository repository;
@@ -81,7 +84,11 @@ protected DfsRefDatabase(DfsRepository repository) {
this.cache = new AtomicReference<>();
}
- /** @return the repository the database holds the references of. */
+ /**
+ * Get the repository the database holds the references of.
+ *
+ * @return the repository the database holds the references of.
+ */
protected DfsRepository getRepository() {
return repository;
}
@@ -90,6 +97,7 @@ boolean exists() throws IOException {
return 0 < read().size();
}
+ /** {@inheritDoc} */
@Override
public Ref exactRef(String name) throws IOException {
RefCache curr = read();
@@ -97,6 +105,7 @@ public Ref exactRef(String name) throws IOException {
return ref != null ? resolve(ref, 0, curr.ids) : null;
}
+ /** {@inheritDoc} */
@Override
public Ref getRef(String needle) throws IOException {
RefCache curr = read();
@@ -110,11 +119,13 @@ public Ref getRef(String needle) throws IOException {
return null;
}
+ /** {@inheritDoc} */
@Override
public List<Ref> getAdditionalRefs() {
return Collections.emptyList();
}
+ /** {@inheritDoc} */
@Override
public Map<String, Ref> getRefs(String prefix) throws IOException {
RefCache curr = read();
@@ -161,6 +172,7 @@ private Ref resolve(Ref ref, int depth, RefList<Ref> loose)
return new SymbolicRef(ref.getName(), dst);
}
+ /** {@inheritDoc} */
@Override
public Ref peel(Ref ref) throws IOException {
final Ref oldLeaf = ref.getLeaf();
@@ -207,6 +219,7 @@ static Ref recreate(Ref old, Ref leaf) {
return leaf;
}
+ /** {@inheritDoc} */
@Override
public RefUpdate newUpdate(String refName, boolean detach)
throws IOException {
@@ -223,6 +236,7 @@ public RefUpdate newUpdate(String refName, boolean detach)
return update;
}
+ /** {@inheritDoc} */
@Override
public RefRename newRename(String fromName, String toName)
throws IOException {
@@ -231,6 +245,7 @@ public RefRename newRename(String fromName, String toName)
return new DfsRefRename(src, dst);
}
+ /** {@inheritDoc} */
@Override
public boolean isNameConflicting(String refName) throws IOException {
RefList<Ref> all = read().ids;
@@ -252,16 +267,19 @@ public boolean isNameConflicting(String refName) throws IOException {
return false;
}
+ /** {@inheritDoc} */
@Override
public void create() {
// Nothing to do.
}
+ /** {@inheritDoc} */
@Override
public void refresh() {
clearCache();
}
+ /** {@inheritDoc} */
@Override
public void close() {
clearCache();
@@ -304,7 +322,7 @@ private RefCache read() throws IOException {
* Read all known references in the repository.
*
* @return all current references of the repository.
- * @throws IOException
+ * @throws java.io.IOException
* references cannot be accessed.
*/
protected abstract RefCache scanAllRefs() throws IOException;
@@ -329,7 +347,7 @@ private RefCache read() throws IOException {
* @param newRef
* new reference to store.
* @return true if the put was successful; false otherwise.
- * @throws IOException
+ * @throws java.io.IOException
* the reference cannot be put due to a system error.
*/
protected abstract boolean compareAndPut(Ref oldRef, Ref newRef)
@@ -341,7 +359,7 @@ protected abstract boolean compareAndPut(Ref oldRef, Ref newRef)
* @param oldRef
* the old reference information that was previously read.
* @return true if the remove was successful; false otherwise.
- * @throws IOException
+ * @throws java.io.IOException
* the reference could not be removed due to a system error.
*/
protected abstract boolean compareAndRemove(Ref oldRef) throws IOException;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefRename.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefRename.java
index d9c2bc7..65ef366 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefRename.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefRename.java
@@ -55,6 +55,7 @@ final class DfsRefRename extends RefRename {
super(src, dst);
}
+ /** {@inheritDoc} */
@Override
protected Result doRename() throws IOException {
// TODO Correctly handle renaming foo/bar to foo.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefUpdate.java
index 1f26fe3..de65c68 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefUpdate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefUpdate.java
@@ -66,16 +66,19 @@ final class DfsRefUpdate extends RefUpdate {
this.refdb = refdb;
}
+ /** {@inheritDoc} */
@Override
protected DfsRefDatabase getRefDatabase() {
return refdb;
}
+ /** {@inheritDoc} */
@Override
protected DfsRepository getRepository() {
return refdb.getRepository();
}
+ /** {@inheritDoc} */
@Override
protected boolean tryLock(boolean deref) throws IOException {
dstRef = getRef();
@@ -90,11 +93,13 @@ protected boolean tryLock(boolean deref) throws IOException {
return true;
}
+ /** {@inheritDoc} */
@Override
protected void unlock() {
// No state is held while "locked".
}
+ /** {@inheritDoc} */
@Override
public Result update(RevWalk walk) throws IOException {
try {
@@ -105,6 +110,7 @@ public Result update(RevWalk walk) throws IOException {
}
}
+ /** {@inheritDoc} */
@Override
protected Result doUpdate(Result desiredResult) throws IOException {
ObjectIdRef newRef;
@@ -129,6 +135,7 @@ protected Result doUpdate(Result desiredResult) throws IOException {
return Result.LOCK_FAILURE;
}
+ /** {@inheritDoc} */
@Override
protected Result doDelete(Result desiredResult) throws IOException {
if (getRefDatabase().compareAndRemove(dstRef)) {
@@ -138,6 +145,7 @@ protected Result doDelete(Result desiredResult) throws IOException {
return Result.LOCK_FAILURE;
}
+ /** {@inheritDoc} */
@Override
protected Result doLink(String target) throws IOException {
final SymbolicRef newRef = new SymbolicRef(
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftable.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftable.java
index 5a8ea92..7502471 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftable.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftable.java
@@ -51,7 +51,9 @@
import org.eclipse.jgit.internal.storage.io.BlockSource;
import org.eclipse.jgit.internal.storage.reftable.ReftableReader;
-/** A reftable stored in {@link DfsBlockCache}. */
+/**
+ * A reftable stored in {@link org.eclipse.jgit.internal.storage.dfs.DfsBlockCache}.
+ */
public class DfsReftable extends BlockBasedFile {
/**
* Construct a reader for an existing reftable.
@@ -83,7 +85,11 @@ public DfsReftable(DfsBlockCache cache, DfsPackDescription desc) {
length = sz > 0 ? sz : -1;
}
- /** @return description that was originally used to configure this file. */
+ /**
+ * Get description that was originally used to configure this file.
+ *
+ * @return description that was originally used to configure this file.
+ */
public DfsPackDescription getPackDescription() {
return desc;
}
@@ -96,7 +102,7 @@ public DfsPackDescription getPackDescription() {
* @param ctx
* reader to access the DFS storage.
* @return cursor to read the table; caller must close.
- * @throws IOException
+ * @throws java.io.IOException
* table cannot be opened.
*/
public ReftableReader open(DfsReader ctx) throws IOException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java
index c7fb227..9c844eb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java
@@ -49,7 +49,6 @@
import java.util.concurrent.locks.ReentrantLock;
import org.eclipse.jgit.annotations.Nullable;
-import org.eclipse.jgit.internal.storage.pack.PackExt;
import org.eclipse.jgit.internal.storage.reftable.MergedReftable;
import org.eclipse.jgit.internal.storage.reftable.RefCursor;
import org.eclipse.jgit.internal.storage.reftable.Reftable;
@@ -64,12 +63,15 @@
import org.eclipse.jgit.util.RefMap;
/**
- * A {@link DfsRefDatabase} that uses reftable for storage.
+ * A {@link org.eclipse.jgit.internal.storage.dfs.DfsRefDatabase} that uses
+ * reftable for storage.
* <p>
* A {@code DfsRefDatabase} instance is thread-safe.
* <p>
- * Implementors may wish to use {@link DfsPackDescription#getMaxUpdateIndex()}
- * as the primary key identifier for a {@link PackExt#REFTABLE} only pack
+ * Implementors may wish to use
+ * {@link org.eclipse.jgit.internal.storage.dfs.DfsPackDescription#getMaxUpdateIndex()}
+ * as the primary key identifier for a
+ * {@link org.eclipse.jgit.internal.storage.pack.PackExt#REFTABLE} only pack
* description, ensuring that when there are competing transactions one wins,
* and one will fail.
*/
@@ -92,28 +94,40 @@ protected DfsReftableDatabase(DfsRepository repo) {
super(repo);
}
+ /** {@inheritDoc} */
@Override
public boolean performsAtomicTransactions() {
return true;
}
+ /** {@inheritDoc} */
@Override
public BatchRefUpdate newBatchUpdate() {
DfsObjDatabase odb = getRepository().getObjectDatabase();
return new ReftableBatchRefUpdate(this, odb);
}
- /** @return configuration to write new reftables with. */
+ /**
+ * Get configuration to write new reftables with.
+ *
+ * @return configuration to write new reftables with.
+ */
public ReftableConfig getReftableConfig() {
return new ReftableConfig(getRepository().getConfig());
}
- /** @return the lock protecting this instance's state. */
+ /**
+ * Get the lock protecting this instance's state.
+ *
+ * @return the lock protecting this instance's state.
+ */
protected ReentrantLock getLock() {
return lock;
}
/**
+ * Whether to compact reftable instead of extending the stack depth.
+ *
* @return {@code true} if commit of a new small reftable should try to
* replace a prior small reftable by performing a compaction,
* instead of extending the stack depth.
@@ -126,7 +140,7 @@ protected boolean compactDuringCommit() {
* Obtain a handle to the merged reader.
*
* @return (possibly cached) handle to the merged reader.
- * @throws IOException
+ * @throws java.io.IOException
* if tables cannot be opened.
*/
protected Reftable reader() throws IOException {
@@ -145,7 +159,7 @@ protected Reftable reader() throws IOException {
* Obtain a handle to the stack of reftables.
*
* @return (possibly cached) handle to the stack.
- * @throws IOException
+ * @throws java.io.IOException
* if tables cannot be opened.
*/
protected ReftableStack stack() throws IOException {
@@ -165,6 +179,7 @@ protected ReftableStack stack() throws IOException {
}
}
+ /** {@inheritDoc} */
@Override
public boolean isNameConflicting(String refName) throws IOException {
lock.lock();
@@ -187,6 +202,7 @@ public boolean isNameConflicting(String refName) throws IOException {
}
}
+ /** {@inheritDoc} */
@Override
public Ref exactRef(String name) throws IOException {
lock.lock();
@@ -202,6 +218,7 @@ public Ref exactRef(String name) throws IOException {
}
}
+ /** {@inheritDoc} */
@Override
public Ref getRef(String needle) throws IOException {
for (String prefix : SEARCH_PATH) {
@@ -213,6 +230,7 @@ public Ref getRef(String needle) throws IOException {
return null;
}
+ /** {@inheritDoc} */
@Override
public Map<String, Ref> getRefs(String prefix) throws IOException {
RefList.Builder<Ref> all = new RefList.Builder<>();
@@ -236,6 +254,7 @@ public Map<String, Ref> getRefs(String prefix) throws IOException {
return new RefMap(prefix, all.toRefList(), none, none);
}
+ /** {@inheritDoc} */
@Override
public Ref peel(Ref ref) throws IOException {
Ref oldLeaf = ref.getLeaf();
@@ -269,6 +288,7 @@ void clearCache() {
}
}
+ /** {@inheritDoc} */
@Override
protected boolean compareAndPut(Ref oldRef, @Nullable Ref newRef)
throws IOException {
@@ -340,11 +360,13 @@ private static String toName(Ref oldRef, Ref newRef) {
return oldRef != null ? oldRef.getName() : newRef.getName();
}
+ /** {@inheritDoc} */
@Override
protected boolean compareAndRemove(Ref oldRef) throws IOException {
return compareAndPut(oldRef, null);
}
+ /** {@inheritDoc} */
@Override
protected RefCache scanAllRefs() throws IOException {
throw new UnsupportedOperationException();
@@ -360,6 +382,7 @@ void removed(String refName) {
// Unnecessary; ReftableBatchRefUpdate calls clearCache().
}
+ /** {@inheritDoc} */
@Override
protected void cachePeeledState(Ref oldLeaf, Ref newLeaf) {
// Do not cache peeled state in reftable.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepository.java
index a5dd514..1976816 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepository.java
@@ -58,7 +58,9 @@
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.StoredConfig;
-/** A Git repository on a DFS. */
+/**
+ * A Git repository on a DFS.
+ */
public abstract class DfsRepository extends Repository {
private final DfsConfig config;
@@ -76,10 +78,15 @@ protected DfsRepository(DfsRepositoryBuilder builder) {
this.description = builder.getRepositoryDescription();
}
+ /** {@inheritDoc} */
@Override
public abstract DfsObjDatabase getObjectDatabase();
- /** @return a description of this repository. */
+ /**
+ * Get the description of this repository.
+ *
+ * @return the description of this repository.
+ */
public DfsRepositoryDescription getDescription() {
return description;
}
@@ -88,7 +95,7 @@ public DfsRepositoryDescription getDescription() {
* Check if the repository already exists.
*
* @return true if the repository exists; false if it is new.
- * @throws IOException
+ * @throws java.io.IOException
* the repository cannot be checked.
*/
public boolean exists() throws IOException {
@@ -98,6 +105,7 @@ public boolean exists() throws IOException {
return true;
}
+ /** {@inheritDoc} */
@Override
public void create(boolean bare) throws IOException {
if (exists())
@@ -110,28 +118,33 @@ public void create(boolean bare) throws IOException {
throw new IOException(result.name());
}
+ /** {@inheritDoc} */
@Override
public StoredConfig getConfig() {
return config;
}
+ /** {@inheritDoc} */
@Override
public void scanForRepoChanges() throws IOException {
getRefDatabase().refresh();
getObjectDatabase().clearCache();
}
+ /** {@inheritDoc} */
@Override
public void notifyIndexChanged() {
// Do not send notifications.
// There is no index, as there is no working tree.
}
+ /** {@inheritDoc} */
@Override
public ReflogReader getReflogReader(String refName) throws IOException {
throw new UnsupportedOperationException();
}
+ /** {@inheritDoc} */
@Override
public AttributesNodeProvider createAttributesNodeProvider() {
// TODO Check if the implementation used in FileRepository can be used
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryBuilder.java
index 77e060a..2b67fd9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryBuilder.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryBuilder.java
@@ -50,7 +50,7 @@
import org.eclipse.jgit.lib.BaseRepositoryBuilder;
/**
- * Constructs a {@link DfsRepository}.
+ * Constructs a {@link org.eclipse.jgit.internal.storage.dfs.DfsRepository}.
*
* @param <B>
* type of the builder class.
@@ -63,7 +63,11 @@ public abstract class DfsRepositoryBuilder<B extends DfsRepositoryBuilder, R ext
private DfsRepositoryDescription repoDesc;
- /** @return options used by readers accessing the repository. */
+ /**
+ * Get options used by readers accessing the repository.
+ *
+ * @return options used by readers accessing the repository.
+ */
public DfsReaderOptions getReaderOptions() {
return readerOptions;
}
@@ -80,7 +84,11 @@ public B setReaderOptions(DfsReaderOptions opt) {
return self();
}
- /** @return a description of the repository. */
+ /**
+ * Get the description of the repository.
+ *
+ * @return the description of the repository.
+ */
public DfsRepositoryDescription getRepositoryDescription() {
return repoDesc;
}
@@ -97,6 +105,7 @@ public B setRepositoryDescription(DfsRepositoryDescription desc) {
return self();
}
+ /** {@inheritDoc} */
@Override
public B setup() throws IllegalArgumentException, IOException {
super.setup();
@@ -108,24 +117,20 @@ public B setup() throws IllegalArgumentException, IOException {
}
/**
+ * {@inheritDoc}
+ * <p>
* Create a repository matching the configuration in this builder.
* <p>
* If an option was not set, the build method will try to default the option
* based on other options. If insufficient information is available, an
* exception is thrown to the caller.
- *
- * @return a repository matching this configuration.
- * @throws IllegalArgumentException
- * insufficient parameters were set.
- * @throws IOException
- * the repository could not be accessed to configure the rest of
- * the builder's parameters.
*/
@Override
public abstract R build() throws IOException;
// We don't support local file IO and thus shouldn't permit these to set.
+ /** {@inheritDoc} */
@Override
public B setGitDir(File gitDir) {
if (gitDir != null)
@@ -133,6 +138,7 @@ public B setGitDir(File gitDir) {
return self();
}
+ /** {@inheritDoc} */
@Override
public B setObjectDirectory(File objectDirectory) {
if (objectDirectory != null)
@@ -140,12 +146,14 @@ public B setObjectDirectory(File objectDirectory) {
return self();
}
+ /** {@inheritDoc} */
@Override
public B addAlternateObjectDirectory(File other) {
throw new UnsupportedOperationException(
JGitText.get().unsupportedAlternates);
}
+ /** {@inheritDoc} */
@Override
public B setWorkTree(File workTree) {
if (workTree != null)
@@ -153,6 +161,7 @@ public B setWorkTree(File workTree) {
return self();
}
+ /** {@inheritDoc} */
@Override
public B setIndexFile(File indexFile) {
if (indexFile != null)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryDescription.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryDescription.java
index 8afad0e..5e6c7e1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryDescription.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryDescription.java
@@ -43,11 +43,15 @@
package org.eclipse.jgit.internal.storage.dfs;
-/** A description of a Git repository on a DFS. */
+/**
+ * A description of a Git repository on a DFS.
+ */
public class DfsRepositoryDescription {
private final String repositoryName;
- /** Initialize a new, empty repository description. */
+ /**
+ * Initialize a new, empty repository description.
+ */
public DfsRepositoryDescription() {
this(null);
}
@@ -62,11 +66,16 @@ public DfsRepositoryDescription(String repositoryName) {
this.repositoryName = repositoryName;
}
- /** @return the name of the repository. */
+ /**
+ * Get the name of the repository.
+ *
+ * @return the name of the repository.
+ */
public String getRepositoryName() {
return repositoryName;
}
+ /** {@inheritDoc} */
@Override
public int hashCode() {
if (getRepositoryName() != null)
@@ -74,6 +83,7 @@ public int hashCode() {
return System.identityHashCode(this);
}
+ /** {@inheritDoc} */
@Override
public boolean equals(Object b) {
if (b instanceof DfsRepositoryDescription){
@@ -84,6 +94,7 @@ public boolean equals(Object b) {
return false;
}
+ /** {@inheritDoc} */
@SuppressWarnings("nls")
@Override
public String toString() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsStreamKey.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsStreamKey.java
index dfb72ca..8793d83 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsStreamKey.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsStreamKey.java
@@ -50,9 +50,13 @@
import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.internal.storage.pack.PackExt;
-/** Key used by {@link DfsBlockCache} to disambiguate streams. */
+/**
+ * Key used by {@link org.eclipse.jgit.internal.storage.dfs.DfsBlockCache} to disambiguate streams.
+ */
public abstract class DfsStreamKey {
/**
+ * Create a {@code DfsStreamKey}
+ *
* @param repo
* description of the containing repository.
* @param name
@@ -71,6 +75,8 @@ public static DfsStreamKey of(DfsRepositoryDescription repo, String name,
final int packExtPos;
/**
+ * Constructor for DfsStreamKey.
+ *
* @param hash
* hash of the other identifying components of the key.
* @param ext
@@ -83,14 +89,17 @@ protected DfsStreamKey(int hash, @Nullable PackExt ext) {
this.packExtPos = ext == null ? 0 : ext.getPosition();
}
+ /** {@inheritDoc} */
@Override
public int hashCode() {
return hash;
}
+ /** {@inheritDoc} */
@Override
public abstract boolean equals(Object o);
+ /** {@inheritDoc} */
@SuppressWarnings("boxing")
@Override
public String toString() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsText.java
index dedcab0..9327bd1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsText.java
@@ -46,9 +46,15 @@
import org.eclipse.jgit.nls.NLS;
import org.eclipse.jgit.nls.TranslationBundle;
-/** Translation bundle for the DFS storage implementation. */
+/**
+ * Translation bundle for the DFS storage implementation.
+ */
public class DfsText extends TranslationBundle {
- /** @return instance of this translation bundle */
+ /**
+ * Get an instance of this translation bundle.
+ *
+ * @return instance of this translation bundle.
+ */
public static DfsText get() {
return NLS.getBundleFor(DfsText.class);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java
index 88fbbe4..662c3fe 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java
@@ -56,11 +56,13 @@ public InMemoryRepository(DfsRepositoryDescription repoDesc) {
refdb = new MemRefDatabase();
}
+ /** {@inheritDoc} */
@Override
public MemObjDatabase getObjectDatabase() {
return objdb;
}
+ /** {@inheritDoc} */
@Override
public RefDatabase getRefDatabase() {
return refdb;
@@ -72,17 +74,20 @@ public RefDatabase getRefDatabase() {
* Useful for testing atomic support enabled or disabled.
*
* @param atomic
+ * whether to use atomic reference transaction support
*/
public void setPerformsAtomicTransactions(boolean atomic) {
refdb.performsAtomicTransactions = atomic;
}
+ /** {@inheritDoc} */
@Override
@Nullable
public String getGitwebDescription() {
return gitwebDescription;
}
+ /** {@inheritDoc} */
@Override
public void setGitwebDescription(@Nullable String d) {
gitwebDescription = d;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java
index 73a93e6..fa2c529 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java
@@ -77,26 +77,31 @@ final class LargePackedWholeObject extends ObjectLoader {
this.db = db;
}
+ /** {@inheritDoc} */
@Override
public int getType() {
return type;
}
+ /** {@inheritDoc} */
@Override
public long getSize() {
return size;
}
+ /** {@inheritDoc} */
@Override
public boolean isLarge() {
return true;
}
+ /** {@inheritDoc} */
@Override
public byte[] getCachedBytes() throws LargeObjectException {
throw new LargeObjectException();
}
+ /** {@inheritDoc} */
@Override
public ObjectStream openStream() throws MissingObjectException, IOException {
DfsReader ctx = db.newReader();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/PackInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/PackInputStream.java
index bb8445b..d88011c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/PackInputStream.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/PackInputStream.java
@@ -64,6 +64,7 @@ final class PackInputStream extends InputStream {
ctx.pin(pack, pos);
}
+ /** {@inheritDoc} */
@Override
public int read(byte[] b, int off, int len) throws IOException {
int n = ctx.copy(pack, pos, b, off, len);
@@ -71,6 +72,7 @@ public int read(byte[] b, int off, int len) throws IOException {
return n;
}
+ /** {@inheritDoc} */
@Override
public int read() throws IOException {
byte[] buf = new byte[1];
@@ -78,6 +80,7 @@ public int read() throws IOException {
return n == 1 ? buf[0] & 0xff : -1;
}
+ /** {@inheritDoc} */
@Override
public void close() {
ctx.close();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReadableChannel.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReadableChannel.java
index 240d552..9b98250 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReadableChannel.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReadableChannel.java
@@ -46,13 +46,15 @@
import java.io.IOException;
import java.nio.channels.ReadableByteChannel;
-/** Readable random access byte channel from a file. */
+/**
+ * Readable random access byte channel from a file.
+ */
public interface ReadableChannel extends ReadableByteChannel {
/**
* Get the current position of the channel.
*
* @return r current offset.
- * @throws IOException
+ * @throws java.io.IOException
* the channel's current position cannot be obtained.
*/
public long position() throws IOException;
@@ -63,7 +65,7 @@ public interface ReadableChannel extends ReadableByteChannel {
* @param newPosition
* position to move the channel to. The next read will start from
* here. This should be a multiple of the {@link #blockSize()}.
- * @throws IOException
+ * @throws java.io.IOException
* the position cannot be updated. This may be because the
* channel only supports block aligned IO and the current
* position is not block aligned.
@@ -78,7 +80,7 @@ public interface ReadableChannel extends ReadableByteChannel {
* read has been completed, the underlying file size should be available.
*
* @return r total size of the channel; -1 if not yet available.
- * @throws IOException
+ * @throws java.io.IOException
* the size cannot be determined.
*/
public long size() throws IOException;
@@ -92,9 +94,10 @@ public interface ReadableChannel extends ReadableByteChannel {
* <p>
* Channels should not recommend large block sizes. Sizes up to 1-4 MiB may
* be reasonable, but sizes above that may be horribly inefficient. The
- * {@link DfsBlockCache} favors the alignment suggested by the channel
- * rather than the configured size under the assumption that reads are very
- * expensive and the channel knows what size is best to access it with.
+ * {@link org.eclipse.jgit.internal.storage.dfs.DfsBlockCache} favors the
+ * alignment suggested by the channel rather than the configured size under
+ * the assumption that reads are very expensive and the channel knows what
+ * size is best to access it with.
*
* @return recommended alignment size for randomly positioned reads. Does
* not need to be a power of 2.
@@ -125,7 +128,7 @@ public interface ReadableChannel extends ReadableByteChannel {
*
* @param bufferSize
* requested size of the read ahead buffer, in bytes.
- * @throws IOException
+ * @throws java.io.IOException
* if the read ahead cannot be adjusted.
*/
public void setReadAheadBytes(int bufferSize) throws IOException;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableBatchRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableBatchRefUpdate.java
index fd73e33..e0c056a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableBatchRefUpdate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableBatchRefUpdate.java
@@ -90,7 +90,10 @@
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.transport.ReceiveCommand;
-/** {@link BatchRefUpdate} for {@link DfsReftableDatabase}. */
+/**
+ * {@link org.eclipse.jgit.lib.BatchRefUpdate} for
+ * {@link org.eclipse.jgit.internal.storage.dfs.DfsReftableDatabase}.
+ */
public class ReftableBatchRefUpdate extends BatchRefUpdate {
private static final int AVG_BYTES = 36;
@@ -119,6 +122,7 @@ protected ReftableBatchRefUpdate(DfsReftableDatabase refdb,
reftableConfig = refdb.getReftableConfig();
}
+ /** {@inheritDoc} */
@Override
public void execute(RevWalk rw, ProgressMonitor pm, List<String> options) {
List<ReceiveCommand> pending = getPending();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableStack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableStack.java
index 3656884..50ba0e0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableStack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableStack.java
@@ -50,7 +50,10 @@
import org.eclipse.jgit.internal.storage.reftable.Reftable;
-/** Tracks multiple open {@link Reftable} instances. */
+/**
+ * Tracks multiple open
+ * {@link org.eclipse.jgit.internal.storage.reftable.Reftable} instances.
+ */
public class ReftableStack implements AutoCloseable {
/**
* Opens a stack of tables for reading.
@@ -61,7 +64,7 @@ public class ReftableStack implements AutoCloseable {
* @param files
* the tables to open.
* @return stack reference to close the tables.
- * @throws IOException
+ * @throws java.io.IOException
* a table could not be opened
*/
public static ReftableStack open(DfsReader ctx, List<DfsReftable> files)
@@ -91,6 +94,8 @@ private ReftableStack(int tableCnt) {
}
/**
+ * Get unmodifiable list of DfsRefatble files
+ *
* @return unmodifiable list of DfsRefatble files, in the same order the
* files were passed to {@link #open(DfsReader, List)}.
*/
@@ -99,6 +104,8 @@ public List<DfsReftable> files() {
}
/**
+ * Get unmodifiable list of tables
+ *
* @return unmodifiable list of tables, in the same order the files were
* passed to {@link #open(DfsReader, List)}.
*/
@@ -106,6 +113,7 @@ public List<Reftable> readers() {
return Collections.unmodifiableList(tables);
}
+ /** {@inheritDoc} */
@Override
public void close() {
for (Reftable t : tables) {