org.apache.lucene.store.jdbc.index
Class FetchOnOpenJdbcIndexInput
java.lang.Object
org.apache.lucene.store.IndexInput
org.apache.lucene.store.jdbc.index.FetchOnOpenJdbcIndexInput
- All Implemented Interfaces:
- Cloneable, JdbcIndexConfigurable
public class FetchOnOpenJdbcIndexInput
- extends IndexInput
- implements JdbcIndexConfigurable
An IndexInput implementation that will read all the relevant data from the
database when created, and will cache it untill it is closed.
Used for small file entries in the database like the segments file.
- Author:
- kimchy
FetchOnOpenJdbcIndexInput
public FetchOnOpenJdbcIndexInput()
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
- Parameters:
name - The name of the file entryjdbcDirectory - The jdbc directory instancesettings - The relevant file entry settings
- Throws:
IOException
readByte
public byte readByte()
throws IOException
- Specified by:
readByte in class IndexInput
- Throws:
IOException
readBytes
public void readBytes(byte[] b,
int offset,
int len)
throws IOException
- Specified by:
readBytes in class IndexInput
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in class IndexInput
- Throws:
IOException
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointer in class IndexInput
seek
public void seek(long pos)
throws IOException
- Specified by:
seek in class IndexInput
- Throws:
IOException
length
public long length()
- Specified by:
length in class IndexInput
Copyright (c) 2004-2008 The Compass Project.