public interface SearchIndexService
Modifier and Type | Method and Description |
---|---|
void |
bulkDelete(org.sonatype.nexus.repository.Repository repository,
Iterable<String> identifiers)
Operation used for bulk removal of data from index of given repository.
|
<T> List<Future<Void>> |
bulkPut(org.sonatype.nexus.repository.Repository repository,
Iterable<T> components,
Function<T,String> identifierProducer,
Function<T,String> jsonDocumentProducer)
Operation used for bulk updating of component index.
|
void |
createIndex(org.sonatype.nexus.repository.Repository repository)
Create index for specified repository, if does not already exits.
|
void |
delete(org.sonatype.nexus.repository.Repository repository,
String identifier)
Removes data with given identifier from index of given repository.
|
void |
deleteIndex(org.sonatype.nexus.repository.Repository repository)
Deletes index for specified repository.
|
void |
flush(boolean fsync)
Flush any pending bulk index requests.
|
long |
getUpdateCount()
Used by ITs to check the frequency of search updates.
|
boolean |
indexExist(org.sonatype.nexus.repository.Repository repository)
Check search index exists for specific repository
|
boolean |
isCalmPeriod()
Used by UTs and ITs only to "wait for calm period" when all search indexing is finished.
|
void |
put(org.sonatype.nexus.repository.Repository repository,
String identifier,
String json)
Puts data with given identifier into index of given repository.
|
void |
rebuildIndex(org.sonatype.nexus.repository.Repository repository)
Rebuilds index for specific repository.
|
void |
waitForCalm()
Wait for a calm period where no search indexing is happening.
|
void createIndex(org.sonatype.nexus.repository.Repository repository)
void deleteIndex(org.sonatype.nexus.repository.Repository repository)
void rebuildIndex(org.sonatype.nexus.repository.Repository repository)
boolean indexExist(org.sonatype.nexus.repository.Repository repository)
void put(org.sonatype.nexus.repository.Repository repository, String identifier, String json)
<T> List<Future<Void>> bulkPut(org.sonatype.nexus.repository.Repository repository, Iterable<T> components, Function<T,String> identifierProducer, Function<T,String> jsonDocumentProducer)
repository
- the source repositorycomponents
- an Iterable
of components to indexidentifierProducer
- a function producing an identifier for a component (never returning null)jsonDocumentProducer
- a function producing a json document for the component (never returning null)void delete(org.sonatype.nexus.repository.Repository repository, String identifier)
void bulkDelete(@Nullable org.sonatype.nexus.repository.Repository repository, Iterable<String> identifiers)
repository
- the source repository (if known)identifiers
- the ids of documents to removevoid flush(boolean fsync)
long getUpdateCount()
boolean isCalmPeriod()
void waitForCalm()
Copyright © 2008–2021 Sonatype, Inc.. All rights reserved.