Author: toad
Date: 2008-04-24 13:19:09 +0000 (Thu, 24 Apr 2008)
New Revision: 19542

Modified:
   trunk/freenet/src/freenet/node/FailureTable.java
Log:
Comments.
Rename innerOfferKey to innerOnOffer.

Modified: trunk/freenet/src/freenet/node/FailureTable.java
===================================================================
--- trunk/freenet/src/freenet/node/FailureTable.java    2008-04-24 13:17:14 UTC 
(rev 19541)
+++ trunk/freenet/src/freenet/node/FailureTable.java    2008-04-24 13:19:09 UTC 
(rev 19542)
@@ -265,12 +265,17 @@
                }
                offerExecutor.execute(new Runnable() {
                        public void run() {
-                               innerOfferKey(key, peer, authenticator);
+                               innerOnOffer(key, peer, authenticator);
                        }
                }, "onOffer()");
        }

-       protected void innerOfferKey(Key key, PeerNode peer, byte[] 
authenticator) {
+       /**
+        * This method runs on the SerialExecutor. Therefore, any blocking 
network I/O needs to be scheduled
+        * on a separate thread. However, blocking disk I/O *should happen on 
this thread*. We deliberately
+        * serialise it, as high latencies can otherwise result.
+        */
+       protected void innerOnOffer(Key key, PeerNode peer, byte[] 
authenticator) {
                //NB: node.hasKey() executes a datastore fetch
                if(node.hasKey(key)) {
                        Logger.minor(this, "Already have key");
@@ -387,7 +392,12 @@
                        }
                }, "sendOfferedKey");
        }
-       
+
+       /**
+        * This method runs on the SerialExecutor. Therefore, any blocking 
network I/O needs to be scheduled
+        * on a separate thread. However, blocking disk I/O *should happen on 
this thread*. We deliberately
+        * serialise it, as high latencies can otherwise result.
+        */
        protected void innerSendOfferedKey(Key key, final boolean isSSK, 
boolean needPubKey, final long uid, final PeerNode source) throws 
NotConnectedException {
                if(isSSK) {
                        SSKBlock block = node.fetch((NodeSSK)key, false);


Reply via email to