org.archive.wayback.resourcestore.locationdb
Class RemoteResourceFileLocationDB

java.lang.Object
  extended by org.archive.wayback.resourcestore.locationdb.RemoteResourceFileLocationDB
All Implemented Interfaces:
ResourceFileLocationDB

public class RemoteResourceFileLocationDB
extends Object
implements ResourceFileLocationDB

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

Constructor Summary
RemoteResourceFileLocationDB(String serverUrl)
           
 
Method Summary
 void addNameUrl(String name, String url)
          add an Url location for an arcName, unless it already exists
 long getCurrentMark()
           
 CloseableIterator<String> getNamesBetweenMarks(long start, long end)
           
static void main(String[] args)
           
 String[] nameToUrls(String name)
          return an array of String URLs for all known locations of the file in the DB.
 void removeNameUrl(String name, String url)
          remove a single url location for a name, if it exists
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteResourceFileLocationDB

public RemoteResourceFileLocationDB(String serverUrl)
Parameters:
serverUrl -
Method Detail

getCurrentMark

public long getCurrentMark()
                    throws IOException
Specified by:
getCurrentMark in interface ResourceFileLocationDB
Returns:
long value representing the current end "mark" of the db log
Throws:
IOException

getNamesBetweenMarks

public CloseableIterator<String> getNamesBetweenMarks(long start,
                                                      long end)
                                               throws IOException
Specified by:
getNamesBetweenMarks in interface ResourceFileLocationDB
Parameters:
start -
end -
Returns:
Iterator of file names between marks start and end
Throws:
IOException

nameToUrls

public String[] nameToUrls(String name)
                    throws IOException
return an array of String URLs for all known locations of the file in the DB.

Specified by:
nameToUrls in interface ResourceFileLocationDB
Parameters:
name -
Returns:
String[] of URLs to arcName
Throws:
IOException

addNameUrl

public void addNameUrl(String name,
                       String url)
                throws IOException
add an Url location for an arcName, unless it already exists

Specified by:
addNameUrl in interface ResourceFileLocationDB
Parameters:
name -
url -
Throws:
IOException

removeNameUrl

public void removeNameUrl(String name,
                          String url)
                   throws IOException
remove a single url location for a name, if it exists

Specified by:
removeNameUrl in interface ResourceFileLocationDB
Parameters:
name -
url -
Throws:
IOException

shutdown

public void shutdown()
              throws IOException
Specified by:
shutdown in interface ResourceFileLocationDB
Throws:
IOException

main

public static void main(String[] args)
Parameters:
args -


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