com.timeindexing.index
Interface ManagedIndex

All Superinterfaces:
ExtendedIndex, ExtendedIndexHeader, Index, IndexEventGenerator, IndexHeader, ManagedIndexHeader
All Known Subinterfaces:
StoredIndex
All Known Implementing Classes:
AbstractManagedIndex, ExternalIndex, FileIndex, IncoreIndex, InlineIndex, ShadowIndex, SQLIndex

public interface ManagedIndex
extends ExtendedIndex, ManagedIndexHeader, IndexEventGenerator

An interface for classes that need to manage Indexes. It has the methods needed to manage an index, but are not needed by the application layer.


Method Summary
 long addReference(IndexReference reference, Timestamp dataTS)
          Add a Referemnce to an IndexItem in a Index.
 boolean create(java.util.Properties props)
          Create this index.
 ManagedIndexHeader getHeader()
          Get the headerfor the index.
 Index getTrackedIndex(ID indexID)
          Get an Index being tracked
 boolean isTrackingIndex(ID indexID)
          Is an Index being tracked
 java.util.Collection listTrackedIndexes()
          List all the tracked Indexes.
 boolean open(java.util.Properties props)
          Open this index.
 boolean reallyClose()
          Close this index.
 int trackReferencedIndex(Index index)
          Track a Referenced Index.
 
Methods inherited from interface com.timeindexing.index.ExtendedIndex
getFirstOffset, getIndexType, getLastFlushPosition, getLastFlushTime, getLastOffset
 
Methods inherited from interface com.timeindexing.index.Index
activate, addDataType, addItem, addItem, addReference, addReference, asView, close, commit, contains, getAnnotationStyle, getDataType, getItem, getItem, getItem, getItemSize, getLastAccessTime, hasAnnotations, hasDataType, isActivated, isChanged, isClosed, isWriteLocked, 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
 

Method Detail

open

public boolean open(java.util.Properties props)
             throws IndexSpecificationException,
                    IndexOpenException
Open this index.

Throws:
IndexSpecificationException
IndexOpenException

create

public boolean create(java.util.Properties props)
               throws IndexSpecificationException,
                      IndexCreateException
Create this index.

Throws:
IndexSpecificationException
IndexCreateException

addReference

public long addReference(IndexReference reference,
                         Timestamp dataTS)
                  throws IndexTerminatedException,
                         IndexClosedException,
                         IndexActivationException,
                         AddItemException
Add a Referemnce to an IndexItem in a Index. This version takes an IndexReference and a Data Timestamp. It is used internally when doing a TimeIndexFactory.save().

Throws:
IndexTerminatedException
IndexClosedException
IndexActivationException
AddItemException

trackReferencedIndex

public int trackReferencedIndex(Index index)
Track a Referenced Index.


isTrackingIndex

public boolean isTrackingIndex(ID indexID)
Is an Index being tracked


getTrackedIndex

public Index getTrackedIndex(ID indexID)
Get an Index being tracked


listTrackedIndexes

public java.util.Collection listTrackedIndexes()
List all the tracked Indexes.


reallyClose

public boolean reallyClose()
                    throws IndexCloseException
Close this index.

Throws:
IndexCloseException

getHeader

public ManagedIndexHeader getHeader()
Get the headerfor the index.