|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.store.jdbc.handler.AbstractFileEntryHandler
public abstract class AbstractFileEntryHandler
A base file entry handler that supports most of the file entry base operations.
Supports the creation of configurableIndexInput and IndexOutput,
base on the JdbcFileEntrySettings.INDEX_INPUT_TYPE_SETTING and
JdbcFileEntrySettings.INDEX_OUTPUT_TYPE_SETTING.
Does not implement the deletion of files.
| Field Summary | |
|---|---|
protected JdbcDirectory |
jdbcDirectory
|
protected JdbcTemplate |
jdbcTemplate
|
protected JdbcTable |
table
|
| Constructor Summary | |
|---|---|
AbstractFileEntryHandler()
|
|
| 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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.lucene.store.jdbc.handler.FileEntryHandler |
|---|
deleteFile, deleteFiles |
| Field Detail |
|---|
protected JdbcDirectory jdbcDirectory
protected JdbcTable table
protected JdbcTemplate jdbcTemplate
| Constructor Detail |
|---|
public AbstractFileEntryHandler()
| Method Detail |
|---|
public void configure(JdbcDirectory jdbcDirectory)
FileEntryHandlerJdbcDirectory initialization process.
configure in interface FileEntryHandler
public boolean fileExists(String name)
throws IOException
FileEntryHandler
fileExists in interface FileEntryHandlername - The name of the file
true of the file exists, false if it does not.
IOException
public long fileModified(String name)
throws IOException
FileEntryHandler
fileModified in interface FileEntryHandlername - The name of the file
IOException
public void touchFile(String name)
throws IOException
FileEntryHandler
touchFile in interface FileEntryHandlername - The name of the file
IOException
public void renameFile(String from,
String to)
throws IOException
FileEntryHandler
renameFile in interface FileEntryHandlerfrom - The name to rename fromto - The name to rename to
IOException
public long fileLength(String name)
throws IOException
FileEntryHandler
fileLength in interface FileEntryHandlername - The name of the file
IOException
public IndexInput openInput(String name)
throws IOException
FileEntryHandlerIndexInput in order to read the file contents.
openInput in interface FileEntryHandlername - The name of the file
IndexInput in order to read the file contents.
IOException
public IndexOutput createOutput(String name)
throws IOException
FileEntryHandlerIndexOutput in order to write the file contents.
createOutput in interface FileEntryHandlername - The name of the file
IndexOutput to write the file contents
IOException
public void close()
throws IOException
FileEntryHandler
close in interface FileEntryHandlerIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||