org.apache.nutch.db
Class WebDBWriter.PageInstructionWriter

java.lang.Object
  extended byorg.apache.nutch.db.WebDBWriter.PageInstructionWriter
Enclosing class:
WebDBWriter

public static class WebDBWriter.PageInstructionWriter
extends Object

PageInstructionWriter very efficiently writes a PageInstruction to a SequenceFile.Writer. Much better than calling "writer.append(new PageInstruction())"


Constructor Summary
WebDBWriter.PageInstructionWriter()
           
 
Method Summary
 void appendInstructionInfo(SequenceFile.Writer writer, Page page, int opcode, Writable val)
          Append the PageInstruction info to the indicated SequenceFile, and keep the PI for later reuse.
 void appendInstructionInfo(SequenceFile.Writer writer, Page page, Link link, int opcode, Writable val)
          Append the PageInstruction info to the indicated SequenceFile, and keep the PI for later reuse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebDBWriter.PageInstructionWriter

public WebDBWriter.PageInstructionWriter()
Method Detail

appendInstructionInfo

public void appendInstructionInfo(SequenceFile.Writer writer,
                                  Page page,
                                  int opcode,
                                  Writable val)
                           throws IOException
Append the PageInstruction info to the indicated SequenceFile, and keep the PI for later reuse.

Throws:
IOException

appendInstructionInfo

public void appendInstructionInfo(SequenceFile.Writer writer,
                                  Page page,
                                  Link link,
                                  int opcode,
                                  Writable val)
                           throws IOException
Append the PageInstruction info to the indicated SequenceFile, and keep the PI for later reuse.

Throws:
IOException


Copyright © 2006 The Apache Software Foundation