Author: nextgens
Date: 2007-03-24 18:08:56 +0000 (Sat, 24 Mar 2007)
New Revision: 12318
Modified:
trunk/freenet/src/freenet/client/StandardOnionFECCodec.java
Log:
Add a few lines of javadoc
Modified: trunk/freenet/src/freenet/client/StandardOnionFECCodec.java
===================================================================
--- trunk/freenet/src/freenet/client/StandardOnionFECCodec.java 2007-03-24
18:06:34 UTC (rev 12317)
+++ trunk/freenet/src/freenet/client/StandardOnionFECCodec.java 2007-03-24
18:08:56 UTC (rev 12318)
@@ -439,6 +439,13 @@
// ###############################
+ /**
+ * The method used to submit {@link FECJob}s to the pool
+ *
+ * @author Florent Daignière <nextgens at
freenetproject.org>
+ *
+ * @param FECJob
+ */
public void addToQueue(FECJob job){
synchronized (_awaitingJobs) {
if((fecRunnerThread == null) ||
!fecRunnerThread.isAlive()){
@@ -462,11 +469,23 @@
private final FECRunner fecRunner = new FECRunner();
private Thread fecRunnerThread;
+ /**
+ * An interface wich has to be implemented by FECJob submitters
+ *
+ * @author Florent Daignière <nextgens at
freenetproject.org>
+ *
+ * WARNING: the callback is expected to release the thread !
+ */
public interface StandardOnionFECCodecEncoderCallback{
public void onEncodedSegment();
public void onDecodedSegment();
}
+ /**
+ * A class bundleing the data meant to be FEC processed
+ *
+ * @author Florent Daignière <nextgens at
freenetproject.org>
+ */
public class FECJob {
final Bucket[] dataBlocks, checkBlocks;
final SplitfileBlock[] dataBlockStatus, checkBlockStatus;
@@ -504,6 +523,13 @@
}
}
+ /**
+ * A private Thread started by {@link StandardOnionFECCodec}...
+ *
+ * @author Florent Daignière <nextgens at
freenetproject.org>
+ *
+ * TODO: maybe it ought to start more than one thread on SMP
system ? (take care, it's memory consumpsive)
+ */
private class FECRunner implements Runnable {
public void run(){
while(true){