org.supermind.crawl
Class LongIntPersister

java.lang.Object
  extended by org.supermind.crawl.util.MapFilePersister<java.lang.Long,java.lang.Integer>
      extended by org.supermind.crawl.LongIntPersister

public class LongIntPersister
extends MapFilePersister<java.lang.Long,java.lang.Integer>


Field Summary
 
Fields inherited from class org.supermind.crawl.MapFilePersister
buffer, maxBufferSize, sorter, tmpWriter
 
Constructor Summary
LongIntPersister()
           
 
Method Summary
 boolean contains(long key)
           
protected  org.apache.nutch.io.WritableComparator getKeyComparator()
          Get comparator for MapFile key class.
 org.apache.nutch.io.WritableComparable getKeyInstance()
          Return a new instance of the key.
protected  java.lang.Class<? extends org.apache.nutch.io.WritableComparable> getMapFileKeyClass()
          Get key class.
 java.lang.Class getMapFileValueClass()
          Get value class.
 java.util.Comparator<java.lang.Long> getTypeComparator()
          Get comparator for type.
protected  void writeBufferToTmp()
          Write contents of buffer to tmpfile.
 
Methods inherited from class org.supermind.crawl.MapFilePersister
add, close, flushToDisk, getValueInstance, init, initTmpWriter, setMapdir, setNfs, setOverwrite, setTmpfile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongIntPersister

public LongIntPersister()
Method Detail

contains

public boolean contains(long key)
                 throws java.io.IOException
Throws:
java.io.IOException

getKeyComparator

protected org.apache.nutch.io.WritableComparator getKeyComparator()
Description copied from class: MapFilePersister
Get comparator for MapFile key class.

Specified by:
getKeyComparator in class MapFilePersister<java.lang.Long,java.lang.Integer>
Returns:

getKeyInstance

public org.apache.nutch.io.WritableComparable getKeyInstance()
Description copied from class: MapFilePersister
Return a new instance of the key.

Specified by:
getKeyInstance in class MapFilePersister<java.lang.Long,java.lang.Integer>
Returns:

getMapFileKeyClass

protected java.lang.Class<? extends org.apache.nutch.io.WritableComparable> getMapFileKeyClass()
Description copied from class: MapFilePersister
Get key class.

Specified by:
getMapFileKeyClass in class MapFilePersister<java.lang.Long,java.lang.Integer>
Returns:

getMapFileValueClass

public java.lang.Class getMapFileValueClass()
Description copied from class: MapFilePersister
Get value class. Defaults to NullWritable.

Overrides:
getMapFileValueClass in class MapFilePersister<java.lang.Long,java.lang.Integer>
Returns:

getTypeComparator

public java.util.Comparator<java.lang.Long> getTypeComparator()
Description copied from class: MapFilePersister
Get comparator for type.

Specified by:
getTypeComparator in class MapFilePersister<java.lang.Long,java.lang.Integer>
Returns:

writeBufferToTmp

protected void writeBufferToTmp()
                         throws java.io.IOException
Description copied from class: MapFilePersister
Write contents of buffer to tmpfile. Subclasses should use MapFilePersister.tmpWriter to do this.

Specified by:
writeBufferToTmp in class MapFilePersister<java.lang.Long,java.lang.Integer>
Throws:
java.io.IOException