|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.timeindexing.index.TimeIndex
public class TimeIndex
This is the generic object that applications interact with. It is a view onto an index.
| Field Summary | |
|---|---|
boolean |
isTerminated
|
| Constructor Summary | |
|---|---|
protected |
TimeIndex(Index impl)
Construct a Time Index using the nominated Index object. |
| Method Summary | |
|---|---|
Index |
activate()
Make the Index activated. |
boolean |
addDataType(ID typeID,
java.lang.String typeName)
Add a new data type |
IndexItem |
addItem(DataItem item)
Add a Data Item to the Index. |
IndexItem |
addItem(DataItem item,
Timestamp datatime)
Add a Data Item to the Index with a specific Data Timestamp |
IndexItem |
addItem(DataItem item,
Timestamp datatime,
long annotation)
Add a Data Item to the Index with a speicifed Data Timestamp and some annotation data |
IndexItem |
addReference(IndexItem otherItem,
Index otherIndex)
Add a Referemnce to an IndexItem in a Index. |
IndexItem |
addReference(IndexItem otherItem,
Index otherIndex,
Timestamp dataTS)
Add a Referemnce to an IndexItem in a Index. |
IndexItem |
addReference(IndexItem otherItem,
Index otherIndex,
Timestamp dataTS,
long annotation)
Add a Reference to an IndexItem in a Index. |
DoubleLinkedList |
apply(Function fn)
Apply a function to all of the IndexItems, resulting in a List of results. |
IndexView |
asView()
Get a view onto the Index. |
IndexView |
backward()
Sets the current navigation position into the IndexView to be one backward. |
java.lang.Object |
clone()
Clone me |
boolean |
close()
Close the index. |
boolean |
commit()
Commit all changes to the index. |
boolean |
contains(Timestamp t)
Does a timestamp fall within the bounds of the Index. |
boolean |
contains(Timestamp t,
IndexTimestampSelector sel)
Does a timestamp fall within the bounds of the Index. |
IndexView |
exchange()
Exchanges the mark into the IndexView, with the current navigation position. |
IndexView |
filter(Function fn)
Filter some IndexItems out into a new IncoreIndex. |
IndexView |
forward()
Sets the current navigation position into the IndexView to be one forward. |
int |
getAnnotationStyle()
Get the annotation style. |
CachePolicy |
getCachePolicy()
Get the CachePolicy |
java.lang.String |
getDataPathName()
Get the path of the data if the index data style is external or shadow. |
long |
getDataSize()
Get the size of the data items, if there is fixed size data. |
java.lang.String |
getDataType(ID typeID)
Get the type name of the things in the data stream. |
Description |
getDescription()
Get the description for an index. |
Position |
getEndPosition()
Get the end position, in the index, of this IndexView. |
Timestamp |
getEndTime()
Get the end time of the index. |
Timestamp |
getFirstDataTime()
Get the data time for the first IndexItem in the Index. |
Timestamp |
getFirstTime()
Get the time the first IndexItem was put into the Index. |
ID |
getID()
Get an ID of an index. |
DataType |
getIndexDataType()
Get the index data type. |
java.lang.String |
getIndexPathName()
Get the path of the index file. |
IndexType |
getIndexType()
Get the type of an index. |
IndexItem |
getItem()
Get the Index Item from the Index at position position(). |
IndexItem |
getItem(long n)
Get an Index Item from the Index. |
IndexItem |
getItem(Position p)
Get an Index Item from the Index. |
IndexItem |
getItem(Timestamp t)
Get an Index Item from the Index. |
IndexItem |
getItem(Timestamp t,
IndexTimestampSelector sel,
Lifetime lifetime)
Get an Index Item from the Index. |
IndexItem |
getItemAtMark()
Get the Index Item from the Index at position mark(). |
int |
getItemSize()
Get the size of the index items. |
Timestamp |
getLastAccessTime()
Get the last time an IndexItem was accessed from the index. |
Timestamp |
getLastDataTime()
Get the data time for the last IndexItem in the Index. |
Timestamp |
getLastTime()
Get the time the last IndexItem was put into the Index. |
long |
getLength()
Get the no of items in the index. |
boolean |
getLoadDataAutomatically()
Does the index load data automatically when doing a get item. |
java.lang.String |
getName()
The name of the index. |
IndexView |
getSelectionIndexView()
Return the IndexView used to get a selection. |
Interval |
getSelectionInterval()
Return the Interval used to get a selection. |
Position |
getStartPosition()
Get the start position, in the index, of this IndexView. |
Timestamp |
getStartTime()
Get the start time of the index. |
java.net.URI |
getURI()
Get the Index specification in the form of a URI. |
boolean |
hasAnnotations()
Does this index have annotations. |
boolean |
hasDataType(java.lang.String typeName)
Does this index have a typed name. |
boolean |
isActivated()
Is the Index activated. |
boolean |
isChanged()
Has the index changed in any way. |
boolean |
isClosed()
Is the Index closed. |
boolean |
isFixedSizeData()
Does the index have fixed size data. |
boolean |
isInTimeOrder()
Is the index still in time order. |
boolean |
isReadOnly()
Is the Index only available for read-only operations. |
boolean |
isSelection()
Is this a selection. |
boolean |
isTerminated()
Is the Index terminated. |
boolean |
isWriteLocked()
Has the Index been write-locked. |
void |
itemAdded(IndexAddEvent event)
An item has been added to the index. |
java.util.Iterator |
iterator()
Get an iterator over the IndexItems in the Index. |
TimestampMapping |
locate(Position p)
Try and determine the Timestamp associated with the speicifed Position. |
TimestampMapping |
locate(Position p,
IndexTimestampSelector sel,
Lifetime lifetime)
Try and determine the Timestamp associated with the speicifed Position. |
TimestampMapping |
locate(Timestamp t)
Try and determine the position associated with the speicifed Timestamp. |
TimestampMapping |
locate(Timestamp t,
IndexTimestampSelector sel,
Lifetime lifetime)
Try and determine the position associated with the speicifed data Timestamp. |
IndexView |
map(Function fn)
Map a function to all of the IndexItems, resulting in a new IncoreIndex. |
IndexView |
mark()
Sets the mark into the IndexView, using the current navigation position as the mark value. |
IndexView |
move(TimeSpecifier ts)
Move the current navigation position in the IndexView using the TimeSpecifier. |
IndexView |
move(TimeSpecifier ts,
IndexTimestampSelector selector,
Lifetime lifetime)
Move the current navigation position in the IndexView using the TimeSpecifier. |
Position |
position()
Gets the current navigation position into the IndexView. |
IndexView |
position(long n)
Sets the current navigation position into the IndexView. |
IndexView |
position(Position p)
Sets the current navigation position into the IndexView specified as a Position. |
IndexView |
position(Timestamp t)
Sets the current navigation position into the IndexView specified as a Timestamp. |
IndexView |
position(Timestamp t,
IndexTimestampSelector selector,
Lifetime lifetime)
Sets the current navigation position into the IndexView specified as a Timestamp. |
Interval |
region()
What is the region covered by position and mark. |
IndexView |
select(AbsoluteTimestamp t,
IntervalSpecifier intervalSpecifier)
Select an Interval given a Timestamp and an IntervalSpecifier. |
IndexView |
select(AbsoluteTimestamp t,
IntervalSpecifier intervalSpecifier,
IndexTimestampSelector selector,
Overlap overlap,
Lifetime lifetime)
Select an Interval given a Timestamp and an IntervalSpecifier. |
IndexView |
select(Interval interval)
Select an Interval given an Interval object. |
IndexView |
select(Interval interval,
IndexTimestampSelector selector,
Overlap overlap,
Lifetime lifetime)
Select an Interval. |
boolean |
setAutoCommit(boolean commit)
Set auto commit to be true or false. |
CachePolicy |
setCachePolicy(CachePolicy policy)
Set a CachePolicy in order to manage the cache. |
boolean |
setLoadDataAutomatically(boolean load)
Load data automatically when doing a get item. |
Index |
terminate()
Make the Index finalized. |
Index |
updateDescription(Description description)
Set the description. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean isTerminated
| Constructor Detail |
|---|
protected TimeIndex(Index impl)
| Method Detail |
|---|
public java.lang.String getName()
getName in interface IndexHeaderpublic ID getID()
getID in interface IndexHeaderpublic java.net.URI getURI()
getURI in interface IndexHeaderpublic IndexType getIndexType()
getIndexType in interface IndexHeaderpublic DataType getIndexDataType()
getIndexDataType in interface IndexHeaderpublic Timestamp getStartTime()
getStartTime in interface IndexHeaderpublic Timestamp getEndTime()
getEndTime in interface IndexHeaderpublic Timestamp getFirstTime()
getFirstTime in interface IndexHeaderpublic Timestamp getLastTime()
getLastTime in interface IndexHeaderpublic Timestamp getFirstDataTime()
getFirstDataTime in interface IndexHeaderpublic Timestamp getLastDataTime()
getLastDataTime in interface IndexHeaderpublic int getItemSize()
getItemSize in interface Indexpublic boolean isFixedSizeData()
isFixedSizeData in interface IndexHeaderpublic long getDataSize()
getDataSize in interface IndexHeaderpublic java.lang.String getDataType(ID typeID)
getDataType in interface Indexpublic boolean hasDataType(java.lang.String typeName)
hasDataType in interface Index
public boolean addDataType(ID typeID,
java.lang.String typeName)
addDataType in interface Indexpublic boolean hasAnnotations()
hasAnnotations in interface Indexpublic int getAnnotationStyle()
getAnnotationStyle in interface Index
public IndexItem addItem(DataItem item)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addItem in interface IndexIndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addItem(DataItem item,
Timestamp datatime)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addItem in interface IndexIndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addItem(DataItem item,
Timestamp datatime,
long annotation)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addItem in interface IndexIndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addReference(IndexItem otherItem,
Index otherIndex)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addReference in interface IndexIndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addReference(IndexItem otherItem,
Index otherIndex,
Timestamp dataTS)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addReference in interface IndexIndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addReference(IndexItem otherItem,
Index otherIndex,
Timestamp dataTS,
long annotation)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addReference in interface IndexIndexTerminatedException
IndexClosedException
IndexActivationException
AddItemExceptionpublic long getLength()
getLength in interface IndexHeader
public IndexItem getItem(long n)
throws GetItemException,
IndexClosedException
getItem in interface IndexGetItemException
IndexClosedException
public IndexItem getItem(Position p)
throws GetItemException,
IndexClosedException
getItem in interface IndexGetItemException
IndexClosedException
public IndexItem getItem(Timestamp t)
throws GetItemException,
IndexClosedException
getItem in interface IndexGetItemException
IndexClosedException
public IndexItem getItem(Timestamp t,
IndexTimestampSelector sel,
Lifetime lifetime)
throws GetItemException,
IndexClosedException
getItem in interface IndexGetItemException
IndexClosedExceptionpublic Timestamp getLastAccessTime()
getLastAccessTime in interface Indexpublic java.lang.String getIndexPathName()
getIndexPathName in interface IndexHeaderpublic java.lang.String getDataPathName()
getDataPathName in interface IndexHeaderpublic Description getDescription()
getDescription in interface IndexHeaderpublic Index updateDescription(Description description)
updateDescription in interface Indexpublic boolean contains(Timestamp t)
contains in interface Index
public boolean contains(Timestamp t,
IndexTimestampSelector sel)
contains in interface Indexpublic TimestampMapping locate(Timestamp t)
locate in interface Index
public TimestampMapping locate(Timestamp t,
IndexTimestampSelector sel,
Lifetime lifetime)
locate in interface Indexpublic TimestampMapping locate(Position p)
locate in interface Index
public TimestampMapping locate(Position p,
IndexTimestampSelector sel,
Lifetime lifetime)
locate in interface Indexpublic IndexView select(Interval interval)
select in interface Index
public IndexView select(AbsoluteTimestamp t,
IntervalSpecifier intervalSpecifier)
select in interface Index
public IndexView select(Interval interval,
IndexTimestampSelector selector,
Overlap overlap,
Lifetime lifetime)
select in interface Index
public IndexView select(AbsoluteTimestamp t,
IntervalSpecifier intervalSpecifier,
IndexTimestampSelector selector,
Overlap overlap,
Lifetime lifetime)
Index
select in interface Index
public IndexView filter(Function fn)
throws TimeIndexException
filter in interface IndexTimeIndexException
public IndexView map(Function fn)
throws TimeIndexException
map in interface IndexTimeIndexException
public DoubleLinkedList apply(Function fn)
throws TimeIndexException
apply in interface IndexTimeIndexExceptionpublic Interval getSelectionInterval()
getSelectionInterval in interface IndexViewpublic IndexView getSelectionIndexView()
getSelectionIndexView in interface IndexViewpublic boolean isSelection()
isSelection in interface IndexViewpublic boolean isActivated()
isActivated in interface Index
public Index activate()
throws IndexReadOnlyException,
IndexWriteLockedException
activate in interface IndexIndexReadOnlyException
IndexWriteLockedExceptionpublic boolean isTerminated()
isTerminated in interface IndexHeaderpublic Index terminate()
terminate in interface Indexpublic boolean isInTimeOrder()
isInTimeOrder in interface IndexHeader
public boolean commit()
throws IndexCommitException
commit in interface IndexIndexCommitExceptionpublic boolean setAutoCommit(boolean commit)
setAutoCommit in interface Indexpublic boolean isClosed()
isClosed in interface Index
public boolean close()
throws IndexCloseException
close in interface IndexIndexCloseExceptionpublic boolean isChanged()
isChanged in interface Indexpublic boolean isReadOnly()
isReadOnly in interface IndexHeaderpublic boolean isWriteLocked()
isWriteLocked in interface Indexpublic IndexView asView()
asView in interface Indexpublic java.util.Iterator iterator()
iterator in interface Index
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic Position position()
position in interface IndexViewpublic IndexView position(Position p)
position in interface IndexViewpublic IndexView position(long n)
position in interface IndexViewpublic IndexView position(Timestamp t)
position in interface IndexView
public IndexView position(Timestamp t,
IndexTimestampSelector selector,
Lifetime lifetime)
position in interface IndexViewpublic Position getStartPosition()
getStartPosition in interface IndexViewpublic Position getEndPosition()
getEndPosition in interface IndexViewpublic IndexView move(TimeSpecifier ts)
move in interface IndexView
public IndexView move(TimeSpecifier ts,
IndexTimestampSelector selector,
Lifetime lifetime)
move in interface IndexViewpublic IndexView mark()
mark in interface IndexViewpublic IndexView forward()
forward in interface IndexViewpublic IndexView backward()
backward in interface IndexView
public IndexItem getItem()
throws GetItemException,
IndexClosedException
getItem in interface IndexViewGetItemException
IndexClosedException
public IndexItem getItemAtMark()
throws GetItemException,
IndexClosedException
getItemAtMark in interface IndexViewGetItemException
IndexClosedExceptionpublic Interval region()
region in interface IndexViewpublic IndexView exchange()
exchange in interface IndexViewpublic CachePolicy getCachePolicy()
getCachePolicy in interface Indexpublic CachePolicy setCachePolicy(CachePolicy policy)
setCachePolicy in interface Indexpublic boolean getLoadDataAutomatically()
getLoadDataAutomatically in interface Indexpublic boolean setLoadDataAutomatically(boolean load)
setLoadDataAutomatically in interface Indexpublic void itemAdded(IndexAddEvent event)
itemAdded in interface IndexAddEventListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||