Package org.fcrepo.search.impl
Class SearchIndexMetrics
- java.lang.Object
-
- org.fcrepo.search.impl.SearchIndexMetrics
-
- All Implemented Interfaces:
SearchIndex
@Component("searchIndex") public class SearchIndexMetrics extends Object implements SearchIndex
SearchIndex wrapper for collecting metrics- Author:
- pwinckles
-
-
Constructor Summary
Constructors Constructor Description SearchIndexMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUpdateIndex(Transaction transaction, ResourceHeaders resourceHeaders)
Adds or updates the index with the resource header information.void
commitTransaction(Transaction tx)
Commit the changes made in the transaction.SearchResult
doSearch(SearchParameters parameters)
Performs a search based on the parameters and returns the result.void
removeFromIndex(Transaction transaction, FedoraId fedoraId)
Removes indexed fields associated with the specified Fedora IDvoid
reset()
Remove all persistent state associated with the index.void
rollbackTransaction(Transaction tx)
Rollback the changes in the transaction.
-
-
-
Constructor Detail
-
SearchIndexMetrics
public SearchIndexMetrics()
-
-
Method Detail
-
addUpdateIndex
public void addUpdateIndex(Transaction transaction, ResourceHeaders resourceHeaders)
Description copied from interface:SearchIndex
Adds or updates the index with the resource header information.- Specified by:
addUpdateIndex
in interfaceSearchIndex
- Parameters:
transaction
- The externally generated transaction.resourceHeaders
- The resource headers associated with the resource
-
removeFromIndex
public void removeFromIndex(Transaction transaction, FedoraId fedoraId)
Description copied from interface:SearchIndex
Removes indexed fields associated with the specified Fedora ID- Specified by:
removeFromIndex
in interfaceSearchIndex
- Parameters:
transaction
- The transactionfedoraId
- The Fedora ID
-
doSearch
public SearchResult doSearch(SearchParameters parameters) throws InvalidQueryException
Description copied from interface:SearchIndex
Performs a search based on the parameters and returns the result.- Specified by:
doSearch
in interfaceSearchIndex
- Parameters:
parameters
- The parameters defining the search- Returns:
- The result of the search
- Throws:
InvalidQueryException
-
reset
public void reset()
Description copied from interface:SearchIndex
Remove all persistent state associated with the index.- Specified by:
reset
in interfaceSearchIndex
-
commitTransaction
public void commitTransaction(Transaction tx)
Description copied from interface:SearchIndex
Commit the changes made in the transaction.- Specified by:
commitTransaction
in interfaceSearchIndex
- Parameters:
tx
- The transaction .
-
rollbackTransaction
public void rollbackTransaction(Transaction tx)
Description copied from interface:SearchIndex
Rollback the changes in the transaction.- Specified by:
rollbackTransaction
in interfaceSearchIndex
- Parameters:
tx
- The transaction.
-
-