net.nutch.db
Class WebDBWriter.LinkInstruction.UrlComparator

java.lang.Object
  extended bynet.nutch.io.WritableComparator
      extended bynet.nutch.db.WebDBWriter.LinkInstruction.UrlComparator
Enclosing class:
WebDBWriter.LinkInstruction

public static class WebDBWriter.LinkInstruction.UrlComparator
extends WritableComparator

Sorts the instruction first by url, then by opcode.


Constructor Summary
WebDBWriter.LinkInstruction.UrlComparator()
           
 
Method Summary
 int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
          Optimized comparator.
 int compare(WritableComparable a, WritableComparable b)
          Compare two WritableComparables.
 
Methods inherited from class net.nutch.io.WritableComparator
compareBytes, getKeyClass, newKey, readFloat, readInt, readLong, readUnsignedShort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebDBWriter.LinkInstruction.UrlComparator

public WebDBWriter.LinkInstruction.UrlComparator()
Method Detail

compare

public int compare(WritableComparable a,
                   WritableComparable b)
Description copied from class: WritableComparator
Compare two WritableComparables.

The default implementation uses the natural ordering, calling Comparable.compareTo(Object).

Overrides:
compare in class WritableComparator

compare

public int compare(byte[] b1,
                   int s1,
                   int l1,
                   byte[] b2,
                   int s2,
                   int l2)
Optimized comparator.

Overrides:
compare in class WritableComparator


Copyright © 2004 The Nutch Organization.