Browse Source

Merge "Add isIndexLoaded() to DfsPackFile."

stable-2.2
Shawn Pearce 12 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
8acaae802c
  1. 6
      org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsPackFile.java

6
org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsPackFile.java

@ -171,6 +171,12 @@ public final class DfsPackFile {
return packDesc;
}
/** @return whether the pack index file is loaded and cached in memory. */
public boolean isIndexLoaded() {
DfsBlockCache.Ref<PackIndex> idxref = index;
return idxref != null && idxref.get() != null;
}
/** @return bytes cached in memory for this pack, excluding the index. */
public long getCachedSize() {
return key.cachedSize.get();

Loading…
Cancel
Save