|
|||||||||
| 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.IncoreIndex
public class IncoreIndex
An implementation of an incore Index object. It represents the index header, the index stream and the data stream.
| Constructor Summary | |
|---|---|
IncoreIndex()
Create an IncoreIndex |
|
| Method Summary | |
|---|---|
Index |
activate()
Make the Index activated. |
boolean |
addIndexURI(ID indexID,
java.net.URI URIName)
Add a new indexID/indexURI |
IndexItem |
addItem(DataItem dataitem)
Add a Data Item to the Index. |
IndexItem |
addItem(DataItem dataitem,
Timestamp dataTS)
Add a Data Item to the Index plus a Timestamp from the Data. |
IndexItem |
addItem(DataItem dataitem,
Timestamp dataTS,
long annotation)
Add a Data Item to the Index plus a Timestamp from the Data. |
IndexItem |
addReference(IndexItem item,
Index other)
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 Referemnce to an IndexItem in a Index. |
IndexItem |
addReference(IndexReference reference,
Timestamp dataTS)
Add a Referemnce to an IndexItem in a Index. |
IndexItem |
addReference(IndexReference reference,
Timestamp dataTS,
long annotation)
Add a Referemnce to an IndexItem in a Index. |
IndexView |
addView()
Add a view to this index. |
IndexView |
asView()
Get a view onto the Index. |
protected void |
checkCreateProperties(java.util.Properties indexProperties)
|
protected void |
checkOpenProperties(java.util.Properties indexProperties)
Check that all the properties needed to open are passed in. |
boolean |
close()
Close this index. |
boolean |
closeView(IndexView view)
Close this index. |
boolean |
create(java.util.Properties properties)
Create this index. |
java.net.URI |
generateURI(java.lang.String name)
Construct a URI from a name |
IndexProperties |
getAllOptions()
Get all the option from the header. |
Offset |
getFirstOffset()
Get the Offset of the fisrt item. |
ManagedIndexHeader |
getHeader()
Get the headerfor the index. |
java.net.URI |
getIndexURI(ID indexID)
Get the index URI of a nominated index. |
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. |
java.lang.Object |
getOption(HeaderOption option)
Get an option from the header. |
Index |
getTrackedIndex(ID indexID)
Get an Index being tracked |
boolean |
hasIndexURI(java.net.URI URIName)
Does this index have the URI of some other index |
boolean |
hasOption(HeaderOption option)
Does an option exist in the header. |
protected void |
init()
Initialize the object. |
protected boolean |
isOpen(java.lang.String name)
Try and determine if this index is alreay open |
boolean |
isTrackingIndex(ID indexID)
Is an Index being tracked |
boolean |
isWriteLocked()
Has the Index been write-locked. |
java.util.Set |
listOptions()
Get the set of optional header values. |
java.util.Collection |
listTrackedIndexes()
List all the Referenced Indexes. |
ManagedIndexHeader |
notInTimeOrder()
State that the index is not in time order any more. |
boolean |
open(java.util.Properties properties)
Open this index. |
boolean |
reallyClose()
Close this index. |
long |
removeView(IndexView view)
Remove a view from this index. |
ManagedIndexHeader |
setDataPathName(java.lang.String path)
Set the path of the data if the index data style is external or shadow. |
ManagedIndexHeader |
setDataSize(long size)
Set the size of the data items, if there is fixed size data. |
ManagedIndexHeader |
setDescription(Description d)
Set the description. |
ManagedIndexHeader |
setEndTime(Timestamp end)
Set the end time |
ManagedIndexHeader |
setFirstDataTime(Timestamp first)
Set the first data time |
ManagedIndexHeader |
setFirstOffset(Offset offset)
Set the Offset of the fisrt item. |
ManagedIndexHeader |
setFirstTime(Timestamp first)
Set the first time |
ManagedIndexHeader |
setID(ID id)
Set the ID of the index. |
ManagedIndexHeader |
setIndexDataType(DataType type)
Set the data type of the index. |
ManagedIndexHeader |
setIndexPathName(java.lang.String path)
Set the path of the index file |
ManagedIndexHeader |
setIndexType(IndexType type)
Set the type of the index. |
ManagedIndexHeader |
setItemSize(int size)
Set the size of the index items. |
ManagedIndexHeader |
setLastDataTime(Timestamp last)
Set the last data time |
ManagedIndexHeader |
setLastOffset(Offset offset)
Set the Offset of the last item. |
ManagedIndexHeader |
setLastTime(Timestamp last)
Set the last time |
ManagedIndexHeader |
setLength(long length)
Set the no of items in the index. |
ManagedIndexHeader |
setName(java.lang.String name)
Set the name of the index. |
ManagedIndexHeader |
setOption(HeaderOption option,
java.lang.Object object)
Set an option in the header. |
ManagedIndexHeader |
setOptions(IndexProperties someProperties)
Set options in the header based on the passed IndexProperties. |
ManagedIndexHeader |
setReadOnly(boolean readonly)
Set the read only status. |
ManagedIndexHeader |
setStartTime(Timestamp start)
Set the start time |
ManagedIndexHeader |
setTerminated(boolean t)
Set the index to be terminated. |
ManagedIndexHeader |
setURI(java.net.URI uri)
Set the URI of the index. |
boolean |
syncHeader(ManagedIndexHeader indexHeader)
Syncrhronize the values in this index header from values in a specified IndexHeader object. |
int |
trackReferencedIndex(Index index)
Track a Referenced Index. |
| 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 |
|---|
addView, closeView, getHeader, getTrackedIndex, isTrackingIndex, listTrackedIndexes, removeView, trackReferencedIndex |
| Methods inherited from interface com.timeindexing.index.ExtendedIndex |
|---|
getIndexType |
| Methods inherited from interface com.timeindexing.index.Index |
|---|
addDataType, apply, asView, close, commit, contains, contains, filter, getAnnotationStyle, getCachePolicy, getDataType, getItem, getItem, getItem, getItemSize, getLastAccessTime, getLoadDataAutomatically, hasAnnotations, hasDataType, isActivated, isChanged, isClosed, iterator, locate, locate, locate, locate, map, select, select, select, select, setAutoCommit, setCachePolicy, setLoadDataAutomatically, terminate, updateDescription |
| 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.index.ExtendedIndexHeader |
|---|
addDataType, getAnnotationStyle, getDataSize, getDataType, getItemSize, hasAnnotations, hasDataType |
| Methods inherited from interface com.timeindexing.index.IndexHeader |
|---|
getDataPathName, getDescription, getEndTime, getFirstDataTime, getFirstTime, getID, getIndexDataType, getIndexPathName, getLastDataTime, getLastTime, getLength, getName, getStartTime, getURI, isFixedSizeData, isInTimeOrder, isReadOnly, isTerminated |
| Methods inherited from interface com.timeindexing.event.IndexEventGenerator |
|---|
addAccessEventListener, addAddEventListener, addPrimaryEventListener, removeAccessEventListener, removeAddEventListener, removePrimaryEventListener |
| Constructor Detail |
|---|
public IncoreIndex()
| Method Detail |
|---|
protected void init()
public boolean open(java.util.Properties properties)
throws IndexSpecificationException,
IndexOpenException
open in interface ManagedIndexIndexSpecificationException
IndexOpenException
public boolean create(java.util.Properties properties)
throws IndexSpecificationException,
IndexCreateException
create in interface ManagedIndexIndexSpecificationException
IndexCreateExceptionpublic Timestamp getLastFlushTime()
getLastFlushTime in interface ExtendedIndexpublic Position getLastFlushPosition()
getLastFlushPosition in interface ExtendedIndexpublic Offset getFirstOffset()
getFirstOffset in interface ExtendedIndexgetFirstOffset in interface ExtendedIndexHeaderpublic Offset getLastOffset()
getLastOffset in interface ExtendedIndexgetLastOffset in interface ExtendedIndexHeader
public Index activate()
throws IndexReadOnlyException,
IndexWriteLockedException
activate in interface IndexIndexReadOnlyException
IndexWriteLockedExceptionpublic boolean isWriteLocked()
isWriteLocked in interface Index
public IndexItem addItem(DataItem dataitem)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addItem in interface IndexaddItem in class AbstractIndexdataitem - the DataItem to add
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addItem(DataItem dataitem,
Timestamp dataTS)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addItem in interface IndexaddItem in class AbstractIndexdataitem - the IndexItem to adddataTS - the Timestamp for the data, null implies that
the data Timestamp is the same as the record Timestamp
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addItem(DataItem dataitem,
Timestamp dataTS,
long annotation)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addItem in interface IndexaddItem in class AbstractIndexdataitem - the IndexItem to adddataTS - the Timestamp for the data, null implies that
the data Timestamp is the same as the record Timestamp
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addReference(IndexItem item,
Index other)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addReference in interface IndexaddReference in class AbstractIndexIndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addReference(IndexItem otherItem,
Index otherIndex,
Timestamp dataTS)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addReference in interface IndexaddReference in class AbstractIndexIndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addReference(IndexItem otherItem,
Index otherIndex,
Timestamp dataTS,
long annotation)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addReference in interface IndexaddReference in class AbstractIndexIndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addReference(IndexReference reference,
Timestamp dataTS)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
addReference in interface ManagedIndexIndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem addReference(IndexReference reference,
Timestamp dataTS,
long annotation)
throws IndexTerminatedException,
IndexClosedException,
IndexActivationException,
AddItemException
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException
public IndexItem getItem(long n)
throws GetItemException
getItem in interface IndexgetItem in class AbstractIndexGetItemExceptionpublic boolean reallyClose()
reallyClose in interface ManagedIndex
protected void checkOpenProperties(java.util.Properties indexProperties)
throws IndexSpecificationException
IndexSpecificationException
protected void checkCreateProperties(java.util.Properties indexProperties)
throws IndexSpecificationException
IndexSpecificationException
public java.net.URI generateURI(java.lang.String name)
throws java.net.URISyntaxException
java.net.URISyntaxExceptionpublic ManagedIndexHeader setName(java.lang.String name)
setName in interface ManagedIndexHeaderpublic ManagedIndexHeader setID(ID id)
setID in interface ManagedIndexHeaderpublic ManagedIndexHeader setURI(java.net.URI uri)
setURI in interface ManagedIndexHeaderpublic ManagedIndexHeader setStartTime(Timestamp start)
setStartTime in interface ManagedIndexHeaderpublic ManagedIndexHeader setEndTime(Timestamp end)
setEndTime in interface ManagedIndexHeaderpublic ManagedIndexHeader setFirstTime(Timestamp first)
setFirstTime in interface ManagedIndexHeaderpublic ManagedIndexHeader setLastTime(Timestamp last)
setLastTime in interface ManagedIndexHeaderpublic ManagedIndexHeader setFirstDataTime(Timestamp first)
setFirstDataTime in interface ManagedIndexHeaderpublic ManagedIndexHeader setLastDataTime(Timestamp last)
setLastDataTime in interface ManagedIndexHeaderpublic ManagedIndexHeader setLength(long length)
setLength in interface ManagedIndexHeaderpublic ManagedIndexHeader setTerminated(boolean t)
setTerminated in interface ManagedIndexHeaderpublic ManagedIndexHeader setItemSize(int size)
setItemSize in interface ManagedIndexHeaderpublic ManagedIndexHeader setDataSize(long size)
setDataSize in interface ManagedIndexHeaderpublic ManagedIndexHeader setFirstOffset(Offset offset)
setFirstOffset in interface ManagedIndexHeaderpublic ManagedIndexHeader setLastOffset(Offset offset)
setLastOffset in interface ManagedIndexHeaderpublic ManagedIndexHeader setIndexType(IndexType type)
setIndexType in interface ManagedIndexHeaderpublic ManagedIndexHeader setIndexDataType(DataType type)
setIndexDataType in interface ManagedIndexHeaderpublic ManagedIndexHeader setIndexPathName(java.lang.String path)
setIndexPathName in interface ManagedIndexHeaderpublic ManagedIndexHeader setDataPathName(java.lang.String path)
setDataPathName in interface ManagedIndexHeaderpublic ManagedIndexHeader setDescription(Description d)
setDescription in interface ManagedIndexHeaderpublic ManagedIndexHeader setReadOnly(boolean readonly)
setReadOnly in interface ManagedIndexHeaderpublic ManagedIndexHeader notInTimeOrder()
notInTimeOrder in interface ManagedIndexHeaderpublic java.net.URI getIndexURI(ID indexID)
getIndexURI in interface ExtendedIndexHeadergetIndexURI in interface ManagedIndexHeaderpublic boolean hasIndexURI(java.net.URI URIName)
hasIndexURI in interface ExtendedIndexHeaderhasIndexURI in interface ManagedIndexHeader
public boolean addIndexURI(ID indexID,
java.net.URI URIName)
addIndexURI in interface ExtendedIndexHeaderaddIndexURI in interface ManagedIndexHeaderpublic java.lang.Object getOption(HeaderOption option)
getOption in interface ManagedIndexHeader
public ManagedIndexHeader setOption(HeaderOption option,
java.lang.Object object)
setOption in interface ManagedIndexHeaderpublic boolean hasOption(HeaderOption option)
hasOption in interface ManagedIndexHeaderpublic java.util.Set listOptions()
listOptions in interface ManagedIndexHeaderpublic IndexProperties getAllOptions()
getAllOptions in interface ManagedIndexHeaderpublic ManagedIndexHeader setOptions(IndexProperties someProperties)
setOptions in interface ManagedIndexHeaderpublic int trackReferencedIndex(Index index)
trackReferencedIndex in interface ManagedIndexpublic boolean isTrackingIndex(ID indexID)
isTrackingIndex in interface ManagedIndexpublic Index getTrackedIndex(ID indexID)
getTrackedIndex in interface ManagedIndexpublic java.util.Collection listTrackedIndexes()
listTrackedIndexes in interface ManagedIndexpublic ManagedIndexHeader getHeader()
getHeader in interface ManagedIndexpublic boolean syncHeader(ManagedIndexHeader indexHeader)
syncHeader in interface ManagedIndexHeader
public boolean close()
throws IndexCloseException
close in interface IndexIndexCloseException
public boolean closeView(IndexView view)
throws IndexCloseException
closeView in interface ManagedIndexIndexCloseExceptionprotected boolean isOpen(java.lang.String name)
public IndexView asView()
asView in interface Indexpublic IndexView addView()
addView in interface ManagedIndexpublic long removeView(IndexView view)
removeView in interface ManagedIndex
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||