Author: j16sdiz
Date: 2008-06-19 10:51:24 +0000 (Thu, 19 Jun 2008)
New Revision: 20475

Modified:
   
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
WrapperManager.signalStarting() on datastore migration


Modified: 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
--- 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java  
    2008-06-19 10:25:42 UTC (rev 20474)
+++ 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java  
    2008-06-19 10:51:24 UTC (rev 20475)
@@ -29,6 +29,8 @@
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;

+import org.tanukisoftware.wrapper.WrapperManager;
+
 import freenet.crypt.BlockCipher;
 import freenet.crypt.PCFBMode;
 import freenet.crypt.SHA256;
@@ -1397,9 +1399,11 @@
                        byte[] key = new byte[fullKeyLength];

                        long maxKey = storeRAF.length() / (headerBlockLength + 
dataBlockLength);
+
+                       WrapperManager.signalStarting((int) (Math.min(7 * 24 * 
60 * 60 * 1000, 5 * 60 * 1000L + maxKey * 100L)));
                        for (int l = 0; true; l++) {
                                if (l % 1024 == 0)
-                                       System.out.println(" key " + l + "/" + 
maxKey);
+                                       System.out.println(" migrating key " + 
l + "/" + maxKey);

                                boolean keyRead = false;
                                storeRAF.readFully(header);


Reply via email to