org.archive.wayback.resourcestore.locationdb
Class ResourceFileLocationDBLog

java.lang.Object
  extended by java.io.File
      extended by org.archive.wayback.resourcestore.locationdb.ResourceFileLocationDBLog
All Implemented Interfaces:
Serializable, Comparable<File>

public class ResourceFileLocationDBLog
extends File

Simple log file tracking new names being added to a ResourceFileLocationDB. Also supports returning an iterator of Strings to a byte range of the log, to simplify tracking deltas to the DB.

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

Field Summary
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
ResourceFileLocationDBLog(String pathname)
           
 
Method Summary
 void addName(String name)
           
 long getCurrentMark()
           
 CloseableIterator<String> getNamesBetweenMarks(long start, long end)
           
 
Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceFileLocationDBLog

public ResourceFileLocationDBLog(String pathname)
                          throws IOException
Parameters:
pathname -
Throws:
IOException
Method Detail

getCurrentMark

public long getCurrentMark()
Returns:
long value indicating the current end position of the log

getNamesBetweenMarks

public CloseableIterator<String> getNamesBetweenMarks(long start,
                                                      long end)
                                               throws IOException
Parameters:
start -
end -
Returns:
CleanableIterator that returns all names between start and end
Throws:
IOException

addName

public void addName(String name)
             throws IOException
Parameters:
name -
Throws:
IOException


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