org.apache.nutch.db
Class WebDBWriter.PageInstruction

java.lang.Object
  extended byorg.apache.nutch.db.WebDBWriter.PageInstruction
All Implemented Interfaces:
Comparable, Writable, WritableComparable
Enclosing class:
WebDBWriter

public static class WebDBWriter.PageInstruction
extends Object
implements WritableComparable

PageInstruction holds an operation over a Page.


Nested Class Summary
static class WebDBWriter.PageInstruction.PageComparator
          Sorts the instruction first by Page, then by opcode.
static class WebDBWriter.PageInstruction.UrlComparator
          Sorts the instruction first by url, then by opcode.
 
Constructor Summary
WebDBWriter.PageInstruction()
           
WebDBWriter.PageInstruction(Page page, int opcode)
           
WebDBWriter.PageInstruction(Page page, Link link, int opcode)
           
 
Method Summary
 int compareTo(Object o)
           
 int getInstruction()
           
 Link getLink()
           
 Page getPage()
           
 void readFields(DataInput in)
          Reads the fields of this object from in.
 void set(Page page, int opcode)
          Init PageInstruction with no Link
 void set(Page page, Link link, int opcode)
          Init PageInstruction with a Link
 void set(WebDBWriter.PageInstruction that)
          Init from another PageInstruction object.
 void write(DataOutput out)
          Writes the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebDBWriter.PageInstruction

public WebDBWriter.PageInstruction()

WebDBWriter.PageInstruction

public WebDBWriter.PageInstruction(Page page,
                                   int opcode)

WebDBWriter.PageInstruction

public WebDBWriter.PageInstruction(Page page,
                                   Link link,
                                   int opcode)
Method Detail

set

public void set(WebDBWriter.PageInstruction that)
Init from another PageInstruction object.


set

public void set(Page page,
                int opcode)
Init PageInstruction with no Link


set

public void set(Page page,
                Link link,
                int opcode)
Init PageInstruction with a Link


compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

write

public void write(DataOutput out)
           throws IOException
Description copied from interface: Writable
Writes the fields of this object to out.

Specified by:
write in interface Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Reads the fields of this object from in. For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Throws:
IOException

getPage

public Page getPage()

getLink

public Link getLink()

getInstruction

public int getInstruction()


Copyright © 2006 The Apache Software Foundation