org.apache.nutch.db
Class DistributedWebDBWriter.LinkInstruction

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

public static class DistributedWebDBWriter.LinkInstruction
extends Object
implements WritableComparable

Holds an instruction over a Link.


Nested Class Summary
static class DistributedWebDBWriter.LinkInstruction.MD5Comparator
          Sorts the instruction first by Md5, then by opcode.
static class DistributedWebDBWriter.LinkInstruction.UrlComparator
          Sorts the instruction first by url, then by opcode.
 
Constructor Summary
DistributedWebDBWriter.LinkInstruction()
           
DistributedWebDBWriter.LinkInstruction(Link link, int instruction)
           
 
Method Summary
 int compareTo(Object o)
           
 int getInstruction()
           
 Link getLink()
           
 void readFields(DataInput in)
          Reads the fields of this object from in.
 void set(DistributedWebDBWriter.LinkInstruction that)
          Re-init from another LinkInstruction's info.
 void set(Link link, int instruction)
          Re-init with a Link and an instruction
 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.LinkInstruction

public DistributedWebDBWriter.LinkInstruction()

DistributedWebDBWriter.LinkInstruction

public DistributedWebDBWriter.LinkInstruction(Link link,
                                              int instruction)
Method Detail

set

public void set(DistributedWebDBWriter.LinkInstruction that)
Re-init from another LinkInstruction's info.


set

public void set(Link link,
                int instruction)
Re-init with a Link and an instruction


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

getLink

public Link getLink()

getInstruction

public int getInstruction()


Copyright © 2006 The Apache Software Foundation