org.apache.nutch.host
Class HostDb

java.lang.Object
  extended by org.apache.nutch.host.HostDb
All Implemented Interfaces:
Closeable

public class HostDb
extends Object
implements Closeable

A caching wrapper for the host datastore.


Field Summary
static int DEFAULT_HOSTDB_CONCURRENCY_LEVEL
           
static int DEFAULT_LRU_SIZE
           
static String HOSTDB_CONCURRENCY_LEVEL
           
static String HOSTDB_LRU_SIZE
           
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
HostDb(Configuration conf)
           
 
Method Summary
 void close()
           
 Host get(String key)
           
 Host getByHostName(String hostName)
           
 void put(String key, Host host)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

HOSTDB_LRU_SIZE

public static final String HOSTDB_LRU_SIZE
See Also:
Constant Field Values

DEFAULT_LRU_SIZE

public static final int DEFAULT_LRU_SIZE
See Also:
Constant Field Values

HOSTDB_CONCURRENCY_LEVEL

public static final String HOSTDB_CONCURRENCY_LEVEL
See Also:
Constant Field Values

DEFAULT_HOSTDB_CONCURRENCY_LEVEL

public static final int DEFAULT_HOSTDB_CONCURRENCY_LEVEL
See Also:
Constant Field Values
Constructor Detail

HostDb

public HostDb(Configuration conf)
       throws IOException
Throws:
IOException
Method Detail

get

public Host get(String key)
         throws IOException
Throws:
IOException

getByHostName

public Host getByHostName(String hostName)
                   throws IOException
Throws:
IOException

put

public void put(String key,
                Host host)
         throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2012 The Apache Software Foundation