|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.timeindexing.index.AbstractIndex
com.timeindexing.index.AbstractManagedIndex
com.timeindexing.index.FileIndex
A place holder abstract class for stored Index objects that are stored in files.
Constructor Summary | |
FileIndex()
|
Method Summary | |
Index |
activate()
Make the Index activated. |
long |
addItem(DataItem dataitem)
Add a Data Item to the Index. |
long |
addItem(DataItem dataitem,
Timestamp dataTS)
Add a Data Item to the Index plus a Timestamp from the Data. |
long |
addReference(IndexItem item,
Index other)
Add a Referemnce to an IndexItem in a Index. |
long |
addReference(IndexItem otherItem,
Index otherIndex,
Timestamp dataTS)
Add a Referemnce to an IndexItem in a Index. |
long |
addReference(IndexReference reference,
Timestamp dataTS)
Add a Referemnce to an IndexItem in a Index. |
boolean |
commit()
Commit this index. |
java.net.URI |
generateURI(java.lang.String pathname)
Construct a URI from a pathname. |
Offset |
getFirstOffset()
Get the Offset of the fisrt item. |
java.lang.String |
getHeaderPathName()
Get the path of the index header. |
IndexItem |
getItem(long n)
Get an Index Item from the Index. |
Position |
getLastFlushPosition()
Get the IndexItem Position when the index was last flushed. |
Timestamp |
getLastFlushTime()
Get the last time the index was flushed. |
Offset |
getLastOffset()
Get the Offset of the last item. |
boolean |
isWriteLocked()
Has the Index been write-locked. |
DataHolderObject |
readData(DataReference dataReference)
Read data for an index item given a DataReference. |
boolean |
reallyClose()
Close this index. |
long |
retrieveItem(IndexItem item,
long position)
Retrieve an Index Item into the Index. |
protected long |
writeItem(FileIndexItem item)
|
Methods inherited from class com.timeindexing.index.AbstractManagedIndex |
addIndexURI, asView, close, getAllOptions, getHeader, getIndexURI, getOption, getTrackedIndex, hasIndexURI, hasOption, isOpen, isTrackingIndex, listOptions, listTrackedIndexes, notInTimeOrder, setDataPathName, setDataSize, setDescription, setEndTime, setFirstDataTime, setFirstOffset, setFirstTime, setID, setIndexDataType, setIndexPathName, setIndexType, setItemSize, setLastDataTime, setLastOffset, setLastTime, setLength, setName, setOption, setOptions, setReadOnly, setStartTime, setTerminated, setURI, syncHeader, trackReferencedIndex |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.timeindexing.index.ManagedIndex |
create, getHeader, getTrackedIndex, isTrackingIndex, listTrackedIndexes, open, trackReferencedIndex |
Methods inherited from interface com.timeindexing.index.ExtendedIndex |
getIndexType |
Methods inherited from interface com.timeindexing.index.Index |
addDataType, asView, close, contains, getAnnotationStyle, getDataType, getItem, getItem, getItemSize, getLastAccessTime, hasAnnotations, hasDataType, isActivated, isChanged, isClosed, iterator, locate, locate, setAutoCommit, setCachePolicy, terminate, updateDescription |
Methods inherited from interface com.timeindexing.index.IndexHeader |
getDataPathName, getDataSize, getDescription, getEndTime, getFirstDataTime, getFirstTime, getID, getIndexDataType, getIndexPathName, getLastDataTime, getLastTime, getLength, getName, getStartTime, getURI, isFixedSizeData, isInTimeOrder, isReadOnly, isTerminated |
Methods inherited from interface com.timeindexing.index.ExtendedIndexHeader |
addDataType, addIndexURI, getAnnotationStyle, getDataSize, getDataType, getIndexURI, getItemSize, hasAnnotations, hasDataType, hasIndexURI |
Methods inherited from interface com.timeindexing.index.ManagedIndexHeader |
addIndexURI, getAllOptions, getIndexURI, getOption, hasIndexURI, hasOption, listOptions, notInTimeOrder, setDataPathName, setDataSize, setDescription, setEndTime, setFirstDataTime, setFirstOffset, setFirstTime, setID, setIndexDataType, setIndexPathName, setIndexType, setItemSize, setLastDataTime, setLastOffset, setLastTime, setLength, setName, setOption, setOptions, setReadOnly, setStartTime, setTerminated, setURI, syncHeader |
Methods inherited from interface com.timeindexing.event.IndexEventGenerator |
addAccessEventListener, addAddEventListener, addPrimaryEventListener, removeAccessEventListener, removeAddEventListener, removePrimaryEventListener |
Constructor Detail |
public FileIndex()
Method Detail |
public boolean commit() throws IndexCommitException
commit
in interface Index
commit
in class AbstractIndex
IndexCommitException
public boolean reallyClose() throws IndexCloseException
reallyClose
in interface ManagedIndex
reallyClose
in class AbstractManagedIndex
IndexCloseException
public long addItem(DataItem dataitem) throws IndexTerminatedException, IndexClosedException, IndexActivationException, AddItemException
addItem
in interface Index
addItem
in class AbstractIndex
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public long addItem(DataItem dataitem, Timestamp dataTS) throws IndexTerminatedException, IndexClosedException, IndexActivationException, AddItemException
addItem
in interface Index
addItem
in class AbstractIndex
dataTS
- the Timestamp for the data, null implies that
the data Timestamp is the same as the record Timestamp
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public long addReference(IndexItem item, Index other) throws IndexTerminatedException, IndexClosedException, IndexActivationException, AddItemException
addReference
in interface Index
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public long addReference(IndexItem otherItem, Index otherIndex, Timestamp dataTS) throws IndexTerminatedException, IndexClosedException, IndexActivationException, AddItemException
addReference
in interface Index
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public long addReference(IndexReference reference, Timestamp dataTS) throws IndexTerminatedException, IndexClosedException, IndexActivationException, AddItemException
addReference
in interface ManagedIndex
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem getItem(long n) throws GetItemException
getItem
in interface Index
getItem
in class AbstractIndex
GetItemException
protected long writeItem(FileIndexItem item) throws IndexTerminatedException, IndexClosedException, IndexActivationException, AddItemException
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public long retrieveItem(IndexItem item, long position)
retrieveItem
in interface StoredIndex
item
- the IndexItem to addposition
- the position to load the IndexItem at
public DataHolderObject readData(DataReference dataReference)
readData
in interface StoredIndex
public java.lang.String getHeaderPathName()
public Timestamp getLastFlushTime()
getLastFlushTime
in interface ExtendedIndex
public Position getLastFlushPosition()
getLastFlushPosition
in interface ExtendedIndex
public Offset getFirstOffset()
getFirstOffset
in interface ExtendedIndex
public Offset getLastOffset()
getLastOffset
in interface ExtendedIndex
public Index activate() throws IndexReadOnlyException, IndexWriteLockedException
activate
in interface Index
IndexReadOnlyException
IndexWriteLockedException
public boolean isWriteLocked()
isWriteLocked
in interface Index
public java.net.URI generateURI(java.lang.String pathname) throws java.net.URISyntaxException
java.net.URISyntaxException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |