|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.nutch.util.NutchGenericFileSystem
NutchGenericFileSystem implements the NutchFileSystem interface and adds some generic utility methods for subclasses to use. The standard task any implementor of NutchFileSystem
Constructor Summary | |
NutchGenericFileSystem(File dbRoot,
ShareSet shareSet,
boolean destructivePut)
Create a Nutch Filesystem at the indicated mounted directory. |
Method Summary | |
void |
close()
Close down the Generic File System |
void |
completeDir(NutchFile nutchFile)
Complete the given directory |
protected abstract void |
copyFile(File srcFile,
String locationMach,
String locationStr,
String nutchFileName,
boolean overwrite)
To be implemented by subclasses |
void |
delete(NutchFile nutchFile)
Take the file out of the NutchFileSystem. |
protected abstract void |
deleteFile(String locationMach,
String locationStr,
String nutchFileName)
|
File |
get(NutchFile nutchFile)
Wait for a NutchFile from somewhere in NutchSpace. |
File |
get(NutchFile nutchFile,
long timeout)
Wait for a NutchFile for the specified amount of time. |
File |
getWorkingFile()
Acquire a real File for a name that's not yet under NutchFS control. |
void |
lock(NutchFile nutchFile,
boolean exclusive)
Obtain a lock with the given NutchFile. |
protected abstract void |
lockFile(String locMach,
String locStr,
String filename,
boolean exclusive)
|
void |
put(NutchFile nutchFile,
File workingFile,
boolean overwrite)
Add a single file or a directory of files to the filesystem. |
void |
release(NutchFile nutchFile)
Release the lock for the given NutchFile |
protected abstract void |
release(String locMach,
String locStr,
String filename)
|
protected abstract void |
renameFile(File srcFile,
String locationMach,
String locationStr,
String nutchFileName,
boolean overwrite)
|
void |
renameTo(NutchFile src,
NutchFile dst)
Rename the thing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NutchGenericFileSystem(File dbRoot, ShareSet shareSet, boolean destructivePut) throws IOException
Method Detail |
public File getWorkingFile() throws IOException
getWorkingFile
in interface NutchFileSystem
IOException
public File get(NutchFile nutchFile) throws IOException
get
in interface NutchFileSystem
IOException
public File get(NutchFile nutchFile, long timeout) throws IOException
get
in interface NutchFileSystem
IOException
public void lock(NutchFile nutchFile, boolean exclusive) throws IOException
lock
in interface NutchFileSystem
IOException
public void release(NutchFile nutchFile) throws IOException
release
in interface NutchFileSystem
IOException
public void put(NutchFile nutchFile, File workingFile, boolean overwrite) throws IOException
put
in interface NutchFileSystem
IOException
public void completeDir(NutchFile nutchFile) throws IOException
completeDir
in interface NutchFileSystem
IOException
public void delete(NutchFile nutchFile) throws IOException
delete
in interface NutchFileSystem
IOException
public void renameTo(NutchFile src, NutchFile dst) throws IOException
renameTo
in interface NutchFileSystem
IOException
public void close() throws IOException
close
in interface NutchFileSystem
IOException
protected abstract void copyFile(File srcFile, String locationMach, String locationStr, String nutchFileName, boolean overwrite) throws IOException
IOException
protected abstract void deleteFile(String locationMach, String locationStr, String nutchFileName) throws IOException
IOException
protected abstract void renameFile(File srcFile, String locationMach, String locationStr, String nutchFileName, boolean overwrite) throws IOException
IOException
protected abstract void lockFile(String locMach, String locStr, String filename, boolean exclusive) throws IOException
IOException
protected abstract void release(String locMach, String locStr, String filename) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |