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 java.lang.Object
implements ResourceFileLocationDB

Version:
$Date: 2008-06-05 14:52:54 -0700 (Thu, 05 Jun 2008) $, $Revision: 2286 $
Author:
brad

Constructor Summary
RemoteResourceFileLocationDB(java.lang.String serverUrl)
           
 
Method Summary
 void addNameUrl(java.lang.String name, java.lang.String url)
          add an Url location for an arcName, unless it already exists
 long getCurrentMark()
           
 CloseableIterator<java.lang.String> getNamesBetweenMarks(long start, long end)
           
static void main(java.lang.String[] args)
           
 java.lang.String[] nameToUrls(java.lang.String name)
          return an array of String URLs for all known locations of the file in the DB.
 void removeNameUrl(java.lang.String name, java.lang.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(java.lang.String serverUrl)
Parameters:
serverUrl -
Method Detail

getCurrentMark

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

getNamesBetweenMarks

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

nameToUrls

public java.lang.String[] nameToUrls(java.lang.String name)
                              throws java.io.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:
java.io.IOException

addNameUrl

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

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

removeNameUrl

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

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

shutdown

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

main

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


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