|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileEntryHandler
A file entry handler acts as a delegate to the JdbcDirectory
for all "file" level
operations. Allows the JdbcDirectory
to be abstracted from any specific implementation
details regarding a file entry, and have several different file entries for different files or
files groups.
JdbcDirectorySettings.registerFileEntrySettings(String, org.apache.lucene.store.jdbc.JdbcFileEntrySettings)
Method Summary | |
---|---|
void |
close()
Closes the file entry handler. |
void |
configure(JdbcDirectory jdbcDirectory)
Called after the entry is created (during the JdbcDirectory initialization process. |
IndexOutput |
createOutput(String name)
Creates an IndexOutput in order to write the file contents. |
void |
deleteFile(String name)
Deletes the given file name. |
List |
deleteFiles(List names)
Deletes a list of files. |
boolean |
fileExists(String name)
Checks if the file exists for the given file name. |
long |
fileLength(String name)
Returns the length of the file (in bytes). |
long |
fileModified(String name)
Returns the last modified date of the file. |
IndexInput |
openInput(String name)
Opens an IndexInput in order to read the file contents. |
void |
renameFile(String from,
String to)
Renames the file entry from "from" to "to". |
void |
touchFile(String name)
Updates the last modified date of the file to the current time. |
Method Detail |
---|
void configure(JdbcDirectory jdbcDirectory)
JdbcDirectory
initialization process.
boolean fileExists(String name) throws IOException
name
- The name of the file
true
of the file exists, false
if it does not.
IOException
long fileModified(String name) throws IOException
name
- The name of the file
IOException
void touchFile(String name) throws IOException
name
- The name of the file
IOException
void deleteFile(String name) throws IOException
name
- The name of the file to delete
IOException
List deleteFiles(List names) throws IOException
names
- The list of file names to delete
null
if all were deleted)
IOException
void renameFile(String from, String to) throws IOException
from
- The name to rename fromto
- The name to rename to
IOException
long fileLength(String name) throws IOException
name
- The name of the file
IOException
IndexInput openInput(String name) throws IOException
IndexInput
in order to read the file contents.
name
- The name of the file
IndexInput
in order to read the file contents.
IOException
IndexOutput createOutput(String name) throws IOException
IndexOutput
in order to write the file contents.
name
- The name of the file
IndexOutput
to write the file contents
IOException
void close() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |