org.apache.lucene.store.jdbc.index
Class RAMJdbcIndexOutput
java.lang.Object
org.apache.lucene.store.IndexOutput
org.apache.lucene.store.ConfigurableBufferedIndexOutput
org.apache.lucene.store.jdbc.index.JdbcBufferedIndexOutput
org.apache.lucene.store.jdbc.index.AbstractJdbcIndexOutput
org.apache.lucene.store.jdbc.index.RAMJdbcIndexOutput
- All Implemented Interfaces:
- JdbcIndexConfigurable
- Direct Known Subclasses:
- OracleRAMJdbcIndexOutput
public class RAMJdbcIndexOutput
- extends AbstractJdbcIndexOutput
An IndexOutput implemenation that stores all the data written to it in memory, and flushes it
to the database when the output is closed.
Useful for small file entries like the segment file.
- Author:
- kimchy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RAMJdbcIndexOutput
public RAMJdbcIndexOutput()
configure
public void configure(String name,
JdbcDirectory jdbcDirectory,
JdbcFileEntrySettings settings)
throws IOException
- Description copied from interface:
JdbcIndexConfigurable
- Configures the newly created
IndexInput or IndexOutput implementations.
- Specified by:
configure in interface JdbcIndexConfigurable- Overrides:
configure in class AbstractJdbcIndexOutput
- Parameters:
name - The name of the file entryjdbcDirectory - The jdbc directory instancesettings - The relevant file entry settings
- Throws:
IOException
flushBuffer
public void flushBuffer(byte[] src,
int offset,
int len)
- Description copied from class:
ConfigurableBufferedIndexOutput
- Expert: implements buffer write. Writes bytes at the current position in
the output.
- Specified by:
flushBuffer in class ConfigurableBufferedIndexOutput
- Parameters:
src - the bytes to writeoffset - the offset in the byte arraylen - the number of bytes to write
openInputStream
protected InputStream openInputStream()
throws IOException
- Specified by:
openInputStream in class AbstractJdbcIndexOutput
- Throws:
IOException
doAfterClose
protected void doAfterClose()
throws IOException
- Overrides:
doAfterClose in class AbstractJdbcIndexOutput
- Throws:
IOException
seek
public void seek(long pos)
throws IOException
- Description copied from class:
ConfigurableBufferedIndexOutput
- Sets current position in this file, where the next write will occur.
- Overrides:
seek in class ConfigurableBufferedIndexOutput
- Throws:
IOException- See Also:
ConfigurableBufferedIndexOutput.getFilePointer()
length
public long length()
- Description copied from class:
ConfigurableBufferedIndexOutput
- The number of bytes in the file.
- Specified by:
length in class ConfigurableBufferedIndexOutput
flushToIndexOutput
public void flushToIndexOutput(IndexOutput indexOutput)
throws IOException
- Throws:
IOException
Copyright (c) 2004-2008 The Compass Project.