org.archive.wayback.resourceindex.distributed
Class RangeGroup

java.lang.Object
  extended by org.archive.wayback.resourceindex.distributed.RangeGroup
All Implemented Interfaces:
ResourceIndex

public class RangeGroup
extends Object
implements ResourceIndex

Version:
$Date: 2010-09-29 05:28:38 +0700 (Wed, 29 Sep 2010) $, $Revision: 3262 $
Author:
brad

Constructor Summary
RangeGroup(String name, String start, String end)
          Constructor
 
Method Summary
protected  RangeMember findBestMember()
           
static Comparator<RangeGroup> getComparator()
           
 String getEnd()
           
 String getName()
           
 String getStart()
           
 SearchResults query(WaybackRequest wbRequest)
          Transform a WaybackRequest into a ResourceResults.
 void setMembers(String[] urls)
          Update the list of members of this group.
 void shutdown()
          Release any resources used by this ResourceIndex cleanly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeGroup

public RangeGroup(String name,
                  String start,
                  String end)
Constructor

Parameters:
name -
start -
end -
Method Detail

setMembers

public void setMembers(String[] urls)
Update the list of members of this group. Members that disappear are lost, but members that remain across the operation retain their state.

Parameters:
urls -

query

public SearchResults query(WaybackRequest wbRequest)
                    throws ResourceIndexNotAvailableException,
                           ResourceNotInArchiveException,
                           BadQueryException,
                           AccessControlException
Description copied from interface: ResourceIndex
Transform a WaybackRequest into a ResourceResults.

Specified by:
query in interface ResourceIndex
Parameters:
wbRequest - WaybackRequest object from RequestParser
Returns:
SearchResults containing SearchResult objects matching the WaybackRequest
Throws:
ResourceIndexNotAvailableException - if the ResourceIndex is not available (remote host down, local files missing, etc)
ResourceNotInArchiveException - if the ResourceIndex could be contacted, but no SearchResult objects matched the request
BadQueryException - if the WaybackRequest is lacking information required to make a reasonable search of this ResourceIndex
AccessControlException - if SearchResult objects actually matched, but could not be returned due to AccessControl restrictions (robots.txt documents, Administrative URL blocks, etc)

findBestMember

protected RangeMember findBestMember()

getEnd

public String getEnd()
Returns:
Returns the end.

getName

public String getName()
Returns:
Returns the name.

getStart

public String getStart()
Returns:
Returns the start.

getComparator

public static Comparator<RangeGroup> getComparator()
Returns:
Comparator suitable for sorting RangeGroup objects

shutdown

public void shutdown()
              throws IOException
Description copied from interface: ResourceIndex
Release any resources used by this ResourceIndex cleanly

Specified by:
shutdown in interface ResourceIndex
Throws:
IOException - for usual causes


Copyright © 2005-2011 Internet Archive. All Rights Reserved.