org.alfresco.repo.search.impl.lucene.index
Interface IndexMonitor

All Known Implementing Classes:
IndexInfo

public interface IndexMonitor

An interface that exposes information about a Lucene Index and that allows registration of a listener for event notifications.


Method Summary
 void addApplicationListener(org.springframework.context.ApplicationListener listener)
          Registers a listener for events on this index.
 long getActualSize()
          Gets the actual size of the index in bytes.
 int getNumberOfDocuments()
          Gets the number of documents in the index.
 int getNumberOfFields()
          Gets the number of fields known to the index.
 int getNumberOfIndexedFields()
          Gets the number of indexed fields.
 java.lang.String getRelativePath()
          Gets the relative path of the index directory.
 java.util.Map getStatusSnapshot()
          Gets a snapshot of the statuses of the individual entries in this index.
 long getUsedSize()
          Gets the size used on disk by the index directory.
 

Method Detail

getRelativePath

java.lang.String getRelativePath()
Gets the relative path of the index directory.

Returns:
the relative path

getStatusSnapshot

java.util.Map getStatusSnapshot()
Gets a snapshot of the statuses of the individual entries in this index.

Returns:
a map of entry status names to entry counts

getActualSize

long getActualSize()
                   throws java.io.IOException
Gets the actual size of the index in bytes.

Returns:
the actual size in bytes
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getUsedSize

long getUsedSize()
                 throws java.io.IOException
Gets the size used on disk by the index directory. A large discrepancy from the value returned by IndexMonitor.getActualSize() may indicate that there are unused data files.

Returns:
the size on disk in bytes
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getNumberOfDocuments

int getNumberOfDocuments()
                         throws java.io.IOException
Gets the number of documents in the index.

Returns:
the number of documents
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getNumberOfFields

int getNumberOfFields()
                      throws java.io.IOException
Gets the number of fields known to the index.

Returns:
the number of fields
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getNumberOfIndexedFields

int getNumberOfIndexedFields()
                             throws java.io.IOException
Gets the number of indexed fields.

Returns:
the number of indexed fields
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

addApplicationListener

void addApplicationListener(org.springframework.context.ApplicationListener listener)
Registers a listener for events on this index.

Parameters:
listener - the listener


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.