org.apache.nutch.db
Class DistributedWebDBWriter.PageInstruction

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

public static class DistributedWebDBWriter.PageInstruction
extends Object
implements WritableComparable

PageInstruction holds an operation over a Page.


Nested Class Summary
static class DistributedWebDBWriter.PageInstruction.PageComparator
          Sorts the instruction first by Page, then by opcode.
static class DistributedWebDBWriter.PageInstruction.UrlComparator
          Sorts the instruction first by url, then by opcode.
 
Constructor Summary
DistributedWebDBWriter.PageInstruction()
           
DistributedWebDBWriter.PageInstruction(Page page, int opcode)
           
DistributedWebDBWriter.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(DistributedWebDBWriter.PageInstruction that)
          Init from another PageInstruction object.
 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 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

DistributedWebDBWriter.PageInstruction

public DistributedWebDBWriter.PageInstruction()

DistributedWebDBWriter.PageInstruction

public DistributedWebDBWriter.PageInstruction(Page page,
                                              int opcode)

DistributedWebDBWriter.PageInstruction

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

set

public void set(DistributedWebDBWriter.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