|
||||||||||
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.ExternalIndexIO
This does I/O for an Index with external data. There are major / primary events on:
Constructor Summary | |
ExternalIndexIO(StoredIndex managedIndex)
Construct an External 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 |
DataHolderObject |
convertDataReference(DataReference dataReference)
Read some data, given a DataReference and return it as a DataHolderObject. |
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. |
boolean |
gotoAppendPosition()
Goto the append position |
boolean |
gotoFirstPosition()
Goto the first 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. |
long |
readDataHeader(byte headerType)
Read an index header from the header stream. |
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. |
boolean |
setAppendPosition()
Set the append position from the indexChannelPosition. |
long |
writeDataHeader(byte headerType)
Write the data file header. |
Methods inherited from class com.timeindexing.io.AbstractFileIO |
addItem, alignForIndexItem, awaitWork, bufferedWrite, drainWriteQueue, flushBuffer, getAppendPosition, getItem, getWriteLock, isWriteLocked, loadIndex, readData, readData, readData, readHeader, readIndexItem, readIndexItem, readItem, readItem, readNormalData, readReferenceData, releaseWriteLock, requestReadWork, requestWriteWork, run, seekToData, seekToIndex, 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 |
loadIndex, readData, readData, readData, readHeader, readItem, readItem |
Methods inherited from interface com.timeindexing.io.IndexFileWriter |
getAppendPosition, getWriteLock, isWriteLocked, releaseWriteLock, writeHeader, writeItem |
Constructor Detail |
public ExternalIndexIO(StoredIndex managedIndex)
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
public DataHolderObject convertDataReference(DataReference dataReference)
convertDataReference
in interface IndexFileReader
convertDataReference
in class AbstractFileIO
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 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
public long readDataHeader(byte headerType) throws java.io.IOException, IndexOpenException
java.io.IOException
IndexOpenException
public long writeDataHeader(byte headerType) throws java.io.IOException
java.io.IOException
public boolean gotoAppendPosition() throws java.io.IOException
gotoAppendPosition
in interface IndexFileReader
gotoAppendPosition
in class AbstractFileIO
java.io.IOException
public boolean gotoFirstPosition() throws java.io.IOException
gotoFirstPosition
in interface IndexFileReader
gotoFirstPosition
in class AbstractFileIO
java.io.IOException
public boolean setAppendPosition() throws java.io.IOException
setAppendPosition
in interface IndexFileReader
setAppendPosition
in class AbstractFileIO
java.io.IOException
public long calculateAppendPosition() throws java.io.IOException
calculateAppendPosition
in class AbstractFileIO
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |