|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.store.IndexInput
org.apache.lucene.store.jdbc.index.JdbcBufferedIndexInput
public abstract class JdbcBufferedIndexInput
A simple base class that performs index input memory based buffering. The buffer size can be configured
under the BUFFER_SIZE_SETTING name.
| Field Summary | |
|---|---|
protected byte[] |
buffer
|
static String |
BUFFER_SIZE_SETTING
The buffer size setting name. |
protected int |
bufferLength
|
protected int |
bufferPosition
|
protected int |
bufferSize
|
protected long |
bufferStart
|
static int |
DEFAULT_BUFFER_SIZE
The default value for the buffer size (in bytes). |
| Constructor Summary | |
|---|---|
JdbcBufferedIndexInput()
|
|
| Method Summary | |
|---|---|
Object |
clone()
|
void |
configure(String name,
JdbcDirectory jdbcDirectory,
JdbcFileEntrySettings settings)
Configures the newly created IndexInput or IndexOutput implementations. |
long |
getFilePointer()
|
byte |
readByte()
|
void |
readBytes(byte[] b,
int offset,
int len)
|
protected abstract void |
readInternal(byte[] b,
int offset,
int length)
Expert: implements buffer refill. |
protected void |
refill()
|
void |
seek(long pos)
|
protected abstract void |
seekInternal(long pos)
Expert: implements seek. |
| Methods inherited from class org.apache.lucene.store.IndexInput |
|---|
close, length, readChars, readInt, readLong, readString, readVInt, readVLong |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BUFFER_SIZE_SETTING
JdbcFileEntrySettings.setIntSetting(String, int).
Should be set in bytes.
public static final int DEFAULT_BUFFER_SIZE
protected byte[] buffer
protected long bufferStart
protected int bufferLength
protected int bufferPosition
protected int bufferSize
| Constructor Detail |
|---|
public JdbcBufferedIndexInput()
| Method Detail |
|---|
public void configure(String name,
JdbcDirectory jdbcDirectory,
JdbcFileEntrySettings settings)
throws IOException
JdbcIndexConfigurableIndexInput or IndexOutput implementations.
configure in interface JdbcIndexConfigurablename - The name of the file entryjdbcDirectory - The jdbc directory instancesettings - The relevant file entry settings
IOException
public byte readByte()
throws IOException
readByte in class IndexInputIOException
public void readBytes(byte[] b,
int offset,
int len)
throws IOException
readBytes in class IndexInputIOException
protected void refill()
throws IOException
IOException
protected abstract void readInternal(byte[] b,
int offset,
int length)
throws IOException
b - the array to read bytes intooffset - the offset in the array to start storing byteslength - the number of bytes to read
IOExceptionpublic long getFilePointer()
getFilePointer in class IndexInput
public void seek(long pos)
throws IOException
seek in class IndexInputIOException
protected abstract void seekInternal(long pos)
throws IOException
readInternal(byte[],int,int) will occur.
IOExceptionreadInternal(byte[],int,int)public Object clone()
clone in class IndexInput
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||