|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.timeindexing.io.AbstractIndexIO
com.timeindexing.io.AbstractFileIO
com.timeindexing.io.InlineIndexIO
This does I/O for an Index with inline data. There are major / primary events on:
Constructor Summary | |
InlineIndexIO(StoredIndex indexMgr)
Construct an Inline Index. |
Method Summary | |
protected long |
alignForData()
Align the index for an append of the Data |
protected long |
bufferedDataWrite(java.nio.ByteBuffer buffer)
Write a buffer of data. |
protected long |
bufferedIndexWrite(java.nio.ByteBuffer buffer)
Write a buffer of index items. |
long |
calculateAppendPosition()
Calculate the append position from the last item of the index. |
long |
close()
Operation on close |
long |
create(IndexProperties indexProperties)
Operation on creation. |
long |
flush()
Operation on flush. |
ManagedIndexItem |
getItem(long position,
boolean doLoadData)
Get the item at index position Position. |
protected java.nio.ByteBuffer |
memoryMapData(long offset,
long size)
Memory map some data from a channel. |
protected long |
open()
Open an index to read it. |
long |
open(IndexProperties indexProperties)
Open an index file to read it. |
protected long |
processData(java.nio.ByteBuffer buffer)
Processing of the data. |
protected long |
processIndexItem(java.nio.ByteBuffer buffer)
Processing of the idnex item. |
protected long |
readDataIntoBuffer(java.nio.ByteBuffer buffer,
long size)
Actually read in the data. |
long |
readMetaData()
Read all the meta data. |
protected boolean |
seekToData(long position)
Seek to a certain position in the data file. |
protected boolean |
seekToIndex(long position)
Seek to a certain position. |
Methods inherited from class com.timeindexing.io.AbstractFileIO |
addItem, alignForIndexItem, awaitWork, bufferedWrite, convertDataReference, drainWriteQueue, flushBuffer, getAppendPosition, getItem, getWriteLock, gotoAppendPosition, gotoFirstPosition, isWriteLocked, loadIndex, readData, readData, readData, readHeader, readIndexItem, readIndexItem, readItem, readItem, readNormalData, readReferenceData, releaseWriteLock, requestReadWork, requestWriteWork, run, seekToData, seekToIndex, setAppendPosition, setItemSize, skipData, timeOut, writeFromWorkQueue, writeHeader, writeItem, writeNormal, writeReference |
Methods inherited from class com.timeindexing.io.AbstractIndexIO |
getIndex, getThread, initThread, startThread, stopThread |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.timeindexing.io.IndexInteractor |
addItem, getIndex, getItem |
Methods inherited from interface com.timeindexing.io.IndexFileReader |
convertDataReference, gotoAppendPosition, gotoFirstPosition, loadIndex, readData, readData, readData, readHeader, readItem, readItem, setAppendPosition |
Methods inherited from interface com.timeindexing.io.IndexFileWriter |
getAppendPosition, getWriteLock, gotoAppendPosition, isWriteLocked, releaseWriteLock, writeHeader, writeItem |
Constructor Detail |
public InlineIndexIO(StoredIndex indexMgr)
Method Detail |
public long create(IndexProperties indexProperties) throws java.io.IOException, IndexCreateException
create
in interface IndexFileWriter
java.io.IOException
IndexCreateException
public long open(IndexProperties indexProperties) throws java.io.IOException, IndexOpenException
open
in interface IndexFileReader
java.io.IOException
IndexOpenException
protected long open() throws java.io.IOException, IndexOpenException
java.io.IOException
IndexOpenException
public long readMetaData() throws java.io.IOException, IndexOpenException
readMetaData
in interface IndexFileReader
java.io.IOException
IndexOpenException
public ManagedIndexItem getItem(long position, boolean doLoadData) throws java.io.IOException
getItem
in interface IndexFileReader
getItem
in class AbstractFileIO
java.io.IOException
protected long alignForData() throws java.io.IOException
alignForData
in class AbstractFileIO
java.io.IOException
protected long processIndexItem(java.nio.ByteBuffer buffer) throws java.io.IOException
processIndexItem
in class AbstractFileIO
java.io.IOException
protected long processData(java.nio.ByteBuffer buffer) throws java.io.IOException
processData
in class AbstractFileIO
java.io.IOException
protected long bufferedIndexWrite(java.nio.ByteBuffer buffer) throws java.io.IOException
bufferedIndexWrite
in class AbstractFileIO
java.io.IOException
protected long bufferedDataWrite(java.nio.ByteBuffer buffer) throws java.io.IOException
bufferedDataWrite
in class AbstractFileIO
java.io.IOException
protected long readDataIntoBuffer(java.nio.ByteBuffer buffer, long size) throws java.io.IOException
readDataIntoBuffer
in class AbstractFileIO
java.io.IOException
protected java.nio.ByteBuffer memoryMapData(long offset, long size) throws java.io.IOException
memoryMapData
in class AbstractFileIO
java.io.IOException
protected boolean seekToIndex(long position) throws java.io.IOException
seekToIndex
in class AbstractFileIO
java.io.IOException
protected boolean seekToData(long position) throws java.io.IOException
seekToData
in class AbstractFileIO
java.io.IOException
public long calculateAppendPosition() throws java.io.IOException
calculateAppendPosition
in class AbstractFileIO
java.io.IOException
public long flush() throws java.io.IOException
flush
in interface IndexFileWriter
java.io.IOException
public long close() throws java.io.IOException
close
in interface IndexFileReader
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |