|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for readers of indexes.
Method Summary | |
long |
close()
Close the index. |
DataHolderObject |
convertDataReference(DataReference ref)
Read some data, given a DataReference and return it as a DataHolderObject. |
ManagedIndexItem |
getItem(long position,
boolean withData)
Get the item |
boolean |
gotoAppendPosition()
Goto the append position |
boolean |
gotoFirstPosition()
Goto the first position. |
long |
loadIndex(LoadStyle loadStyle)
Load the index data, based on a specified LoadStyle. |
long |
open(IndexProperties indexProperties)
|
java.nio.ByteBuffer |
readData(DataReference ref)
Read some data, given a DataReferenceObject |
java.nio.ByteBuffer |
readData(long offset,
long size)
Read some data, given an offset and a size. |
java.nio.ByteBuffer |
readData(Offset offset,
long size)
Read some data, given an offset and a size. |
long |
readHeader(byte headerType)
Read an index header from the header stream. |
ManagedIndexItem |
readItem(long offset,
boolean withData)
Read the contents of the item It assumes the index file is alreayd open for writing. |
ManagedIndexItem |
readItem(Offset offset,
boolean withData)
Read the contents of the item It assumes the index file is alreayd open for writing. |
long |
readMetaData()
Read all the meta data. |
boolean |
setAppendPosition()
Set the append position |
Method Detail |
public long open(IndexProperties indexProperties) throws java.io.IOException, IndexOpenException
java.io.IOException
IndexOpenException
public long readHeader(byte headerType) throws java.io.IOException, IndexOpenException
headerType
- the type of header, e.g FileType.INLINE_INDEX or FileType.EXTERNAL_INDEX
java.io.IOException
IndexOpenException
public long readMetaData() throws java.io.IOException, IndexOpenException
java.io.IOException
IndexOpenException
public ManagedIndexItem getItem(long position, boolean withData) throws java.io.IOException
position
- the position of the index item to getwithData
- read the data for this IndexItem if withData is true,
the data needs to be read at a later time, otherwise
java.io.IOException
public ManagedIndexItem readItem(Offset offset, boolean withData) throws java.io.IOException
offset
- the byte offset in the file to start reading an item fromwithData
- read the data for this IndexItem if withData is true,
the data needs to be read at a later time, otherwise
java.io.IOException
public ManagedIndexItem readItem(long offset, boolean withData) throws java.io.IOException
offset
- the byte offset in the file to start reading an item fromwithData
- read the data for this IndexItem if withData is true,
the data needs to be read at a later time, otherwise
java.io.IOException
public java.nio.ByteBuffer readData(Offset offset, long size) throws java.io.IOException
offset
- the byte offset in the file to start reading an item fromsize
- the number of bytes to read
java.io.IOException
public java.nio.ByteBuffer readData(long offset, long size) throws java.io.IOException
offset
- the byte offset in the file to start reading an item fromsize
- the number of bytes to read
java.io.IOException
public java.nio.ByteBuffer readData(DataReference ref) throws java.io.IOException
java.io.IOException
public DataHolderObject convertDataReference(DataReference ref)
public long loadIndex(LoadStyle loadStyle) throws java.io.IOException
java.io.IOException
public boolean gotoFirstPosition() throws java.io.IOException
java.io.IOException
public boolean gotoAppendPosition() throws java.io.IOException
java.io.IOException
public boolean setAppendPosition() throws java.io.IOException
java.io.IOException
public long close() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |