Author: toad
Date: 2007-03-15 20:04:22 +0000 (Thu, 15 Mar 2007)
New Revision: 12137
Modified:
trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
Rename dontCheck -> offline
Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-03-15
19:56:33 UTC (rev 12136)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-03-15
20:04:22 UTC (rev 12137)
@@ -916,12 +916,11 @@
/**
* Shrink the store, on the fly/quickly.
- * @param dontCheck If true, keep going until the store has shrunk
enough.
- * @param dontCheckForHoles
+ * @param offline If true, keep going until the store has shrunk enough.
* @throws DatabaseException
* @throws IOException
*/
- private void maybeQuickShrink(boolean dontCheck) throws
DatabaseException, IOException {
+ private void maybeQuickShrink(boolean offline) throws
DatabaseException, IOException {
// long's are not atomic.
long maxBlocks;
long curBlocks;
@@ -933,22 +932,20 @@
return;
}
}
- innerQuickShrink(curBlocks, maxBlocks, dontCheck);
+ innerQuickShrink(curBlocks, maxBlocks, offline);
}
/**
* @param curBlocks The current number of blocks in the file. (From the
file length).
* @param maxBlocks The target number of blocks in the file. (The file
will be truncated to this length in blocks).
- * @param dontCheck If true, innerQuickShrink will run once. If false,
after the first run, if
+ * @param offline If true, innerQuickShrink will run once. If false,
after the first run, if
* the store is still over its required size, it will shrink it again,
and so on until the store
* is within its required size.
* If false, innerQuickShrink will repeat itself until it deletes no
more blocks, This is to handle
- * @param dontCheckForHoles If true, and if dontCheck is false, this
function will check the store
- * for holes after every pass.
* @throws DatabaseException If a database error occurs.
* @throws IOException If an I/O error occurs.
*/
- private void innerQuickShrink(long curBlocks, long maxBlocks, boolean
dontCheck) throws DatabaseException, IOException {
+ private void innerQuickShrink(long curBlocks, long maxBlocks, boolean
offline) throws DatabaseException, IOException {
long oldCurBlocks = curBlocks;
try {
curBlocks = Math.max(oldCurBlocks,
highestBlockNumberInDatabase());
@@ -999,7 +996,7 @@
t = null;
- if(dontCheck) break;
+ if(offline) break;
System.err.println("Checking...");
synchronized(this) {
maxBlocks = maxChkBlocks;