org.apache.lucene.store.jdbc.index
Class FetchOnBufferReadJdbcIndexInput
java.lang.Object
org.apache.lucene.store.IndexInput
org.apache.lucene.store.ConfigurableBufferedIndexInput
org.apache.lucene.store.jdbc.index.JdbcBufferedIndexInput
org.apache.lucene.store.jdbc.index.FetchOnBufferReadJdbcIndexInput
- All Implemented Interfaces:
- Cloneable, JdbcIndexConfigurable
public class FetchOnBufferReadJdbcIndexInput
- extends JdbcBufferedIndexInput
An IndexInput implementation, that for every buffer refill will go and fetch
the data from the database.
- Author:
- kimchy
FetchOnBufferReadJdbcIndexInput
public FetchOnBufferReadJdbcIndexInput()
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 JdbcBufferedIndexInput
- Parameters:
name - The name of the file entryjdbcDirectory - The jdbc directory instancesettings - The relevant file entry settings
- Throws:
IOException
refill
protected void refill()
throws IOException
- Overrides:
refill in class ConfigurableBufferedIndexInput
- Throws:
IOException
readInternal
protected void readInternal(byte[] b,
int offset,
int length)
throws IOException
- Description copied from class:
ConfigurableBufferedIndexInput
- Expert: implements buffer refill. Reads bytes from the current position
in the input.
- Specified by:
readInternal in class ConfigurableBufferedIndexInput
- Parameters:
b - the array to read bytes intooffset - the offset in the array to start storing byteslength - the number of bytes to read
- Throws:
IOException
seekInternal
protected void seekInternal(long pos)
throws IOException
- Description copied from class:
ConfigurableBufferedIndexInput
- Expert: implements seek. Sets current position in this file, where the
next
ConfigurableBufferedIndexInput.readInternal(byte[],int,int) will occur.
- Specified by:
seekInternal in class ConfigurableBufferedIndexInput
- Throws:
IOException- See Also:
ConfigurableBufferedIndexInput.readInternal(byte[],int,int)
close
public void close()
throws IOException
- Specified by:
close in class IndexInput
- Throws:
IOException
length
public long length()
- Specified by:
length in class IndexInput
Copyright (c) 2004-2008 The Compass Project.