|
||||||||||
| 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. |
java.nio.channels.FileLock |
getWriteLock()
Get a write-lock on this index. |
boolean |
isWriteLocked()
Has the Index been write-locked. |
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 void |
reallyClose()
Close the index channel |
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, gotoAppendPosition, gotoFirstPosition, 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, gotoAppendPosition, releaseWriteLock, writeHeader, writeItem |
| Constructor Detail |
public InlineIndexIO(StoredIndex indexMgr)
| Method Detail |
public long create(IndexProperties indexProperties)
throws java.io.IOException,
IndexCreateException
create in interface IndexFileWriterjava.io.IOException
IndexCreateException
public long open(IndexProperties indexProperties)
throws java.io.IOException,
IndexOpenException
open in interface IndexFileReaderjava.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 IndexFileReaderjava.io.IOException
IndexOpenException
public ManagedIndexItem getItem(long position,
boolean doLoadData)
throws java.io.IOException
getItem in interface IndexFileReadergetItem in class AbstractFileIOjava.io.IOException
protected long alignForData()
throws java.io.IOException
alignForData in class AbstractFileIOjava.io.IOException
protected long processIndexItem(java.nio.ByteBuffer buffer)
throws java.io.IOException
processIndexItem in class AbstractFileIOjava.io.IOException
protected long processData(java.nio.ByteBuffer buffer)
throws java.io.IOException
processData in class AbstractFileIOjava.io.IOException
protected long bufferedIndexWrite(java.nio.ByteBuffer buffer)
throws java.io.IOException
bufferedIndexWrite in class AbstractFileIOjava.io.IOException
protected long bufferedDataWrite(java.nio.ByteBuffer buffer)
throws java.io.IOException
bufferedDataWrite in class AbstractFileIOjava.io.IOException
protected long readDataIntoBuffer(java.nio.ByteBuffer buffer,
long size)
throws java.io.IOException
readDataIntoBuffer in class AbstractFileIOjava.io.IOException
protected java.nio.ByteBuffer memoryMapData(long offset,
long size)
throws java.io.IOException
memoryMapData in class AbstractFileIOjava.io.IOException
protected boolean seekToIndex(long position)
throws java.io.IOException
seekToIndex in class AbstractFileIOjava.io.IOException
protected boolean seekToData(long position)
throws java.io.IOException
seekToData in class AbstractFileIOjava.io.IOException
public long calculateAppendPosition()
throws java.io.IOException
calculateAppendPosition in class AbstractFileIOjava.io.IOException
public long flush()
throws java.io.IOException
flush in interface IndexFileWriterjava.io.IOException
public long close()
throws java.io.IOException
close in interface IndexFileReaderjava.io.IOException
protected void reallyClose()
throws java.io.IOException
java.io.IOExceptionpublic boolean isWriteLocked()
isWriteLocked in interface IndexFileWriterisWriteLocked in class AbstractFileIOpublic java.nio.channels.FileLock getWriteLock()
getWriteLock in interface IndexFileWritergetWriteLock in class AbstractFileIO
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||