com.timeindexing.index
Interface ManagedIndex

All Superinterfaces:
ExtendedIndex, ExtendedIndexHeader, Index, IndexEventGenerator, IndexHeader, ManagedIndexHeader
All Known Subinterfaces:
StoredIndex
All Known Implementing Classes:
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
 IndexItem addReference(IndexReference reference, Timestamp dataTS)
          Add a Referemnce to an IndexItem in a Index.
 IndexView addView()
          Add a view to this index.
 boolean closeView(IndexView view)
          Close the index from a specified view Intened to close all associated streams and files, and this sets the end time too.
 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.
 long removeView(IndexView view)
          Remove a view from 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, addItem, addReference, addReference, addReference, apply, asView, close, commit, contains, contains, filter, getAnnotationStyle, getCachePolicy, getDataType, getItem, getItem, getItem, getItem, getItemSize, getLastAccessTime, getLoadDataAutomatically, hasAnnotations, hasDataType, isActivated, isChanged, isClosed, isWriteLocked, 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
 

Method Detail

open

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

Throws:
IndexSpecificationException
IndexOpenException

create

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

Throws:
IndexSpecificationException
IndexCreateException

addReference

IndexItem 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

int trackReferencedIndex(Index index)
Track a Referenced Index.


isTrackingIndex

boolean isTrackingIndex(ID indexID)
Is an Index being tracked


getTrackedIndex

Index getTrackedIndex(ID indexID)
Get an Index being tracked


listTrackedIndexes

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


closeView

boolean closeView(IndexView view)
                  throws IndexCloseException
Close the index from a specified view Intened to close all associated streams and files, and this sets the end time too.

Throws:
IndexCloseException

reallyClose

boolean reallyClose()
                    throws IndexCloseException
Close this index.

Throws:
IndexCloseException

getHeader

ManagedIndexHeader getHeader()
Get the headerfor the index.


addView

IndexView addView()
Add a view to this index.

Returns:
the IndexView itself

removeView

long removeView(IndexView view)
Remove a view from this index.

Returns:
How many views are still left on the Index


Timeindexing 2008