Correctly name DeltaBaseCache

This class is used only to cache the unpacked form of an object that
was used as a base for another object.  The theory goes that if an
object is used as a delta base for A, it will probably also be a
delta base for B, C, D, E, etc. and therefore having an unpacked copy
of it on hand will make delta resolution for the others very fast.

However since objects are usually only accessed once, we don't want
to cache everything we unpack, just things that we are likely to
need again.  The only things we need again are the delta bases.
Hence, its a delta base cache.

This gets us the class name UnpackedObjectCache back, so we can
use it to actually create a cache of unpacked object information.

Change-Id: I121f356cf4eca7b80126497264eac22bd5825a1d
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/UnpackedObjectCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/DeltaBaseCache.java
similarity index 98%
rename from org.eclipse.jgit/src/org/eclipse/jgit/storage/file/UnpackedObjectCache.java
rename to org.eclipse.jgit/src/org/eclipse/jgit/storage/file/DeltaBaseCache.java
index 92f4824..8b54824 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/UnpackedObjectCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/DeltaBaseCache.java
@@ -45,7 +45,7 @@
 
 import java.lang.ref.SoftReference;
 
-class UnpackedObjectCache {
+class DeltaBaseCache {
 	private static final int CACHE_SZ = 1024;
 
 	private static final SoftReference<Entry> DEAD;
@@ -164,7 +164,7 @@
 		e.sz = 0;
 	}
 
-	private UnpackedObjectCache() {
+	private DeltaBaseCache() {
 		throw new UnsupportedOperationException();
 	}
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java
index ed159ef..5239111 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java
@@ -220,7 +220,7 @@
 	 * Close the resources utilized by this repository
 	 */
 	public void close() {
-		UnpackedObjectCache.purge(this);
+		DeltaBaseCache.purge(this);
 		WindowCache.purge(this);
 		synchronized (this) {
 			loadedIdx = null;
@@ -274,14 +274,6 @@
 		return getReverseIdx().findObject(offset);
 	}
 
-	private final UnpackedObjectCache.Entry readCache(final long position) {
-		return UnpackedObjectCache.get(this, position);
-	}
-
-	private final void saveCache(final long position, final byte[] data, final int type) {
-		UnpackedObjectCache.store(this, position, data, type);
-	}
-
 	private final byte[] decompress(final long position, final long totalSize,
 			final WindowCursor curs) throws IOException, DataFormatException {
 		final byte[] dstbuf = new byte[(int) totalSize];
@@ -700,7 +692,7 @@
 		byte[] data;
 		int type;
 
-		UnpackedObjectCache.Entry e = readCache(posBase);
+		DeltaBaseCache.Entry e = DeltaBaseCache.get(this, posBase);
 		if (e != null) {
 			data = e.data;
 			type = e.type;
@@ -715,7 +707,7 @@
 			}
 			data = p.getCachedBytes();
 			type = p.getType();
-			saveCache(posBase, data, type);
+			DeltaBaseCache.store(this, posBase, data, type);
 		}
 
 		// At this point we have the base, and its small, and the delta
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCache.java
index 68fa191..f533af4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCache.java
@@ -187,7 +187,7 @@
 			oc.removeAll();
 		cache = nc;
 		streamFileThreshold = cfg.getStreamFileThreshold();
-		UnpackedObjectCache.reconfigure(cfg);
+		DeltaBaseCache.reconfigure(cfg);
 	}
 
 	static int getStreamFileThreshold() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java
index 90ea376..95ec6f7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java
@@ -146,7 +146,7 @@
 	}
 
 	/**
-	 * @return maximum number of bytes to cache in {@link UnpackedObjectCache}
+	 * @return maximum number of bytes to cache in {@link DeltaBaseCache}
 	 *         for inflated, recently accessed objects, without delta chains.
 	 *         <b>Default 10 MB.</b>
 	 */
@@ -157,7 +157,7 @@
 	/**
 	 * @param newLimit
 	 *            maximum number of bytes to cache in
-	 *            {@link UnpackedObjectCache} for inflated, recently accessed
+	 *            {@link DeltaBaseCache} for inflated, recently accessed
 	 *            objects, without delta chains.
 	 */
 	public void setDeltaBaseCacheLimit(final int newLimit) {