@Service(value="indexManager#none") public class GenericIndexManager extends Object implements ArchivaIndexManager
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_INDEXER_DIR |
private org.slf4j.Logger |
log |
| Constructor and Description |
|---|
GenericIndexManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addArtifactsToIndex(ArchivaIndexingContext context,
Collection<URI> artifactReference)
Adds a list of artifacts to the index.
|
ArchivaIndexingContext |
createContext(Repository repository)
Creates the indexing context for the given repository.
|
private Path |
getIndexPath(Repository repo) |
ArchivaIndexingContext |
move(ArchivaIndexingContext context,
Repository repo)
Moves the context to a new directory.
|
void |
pack(ArchivaIndexingContext context)
Compresses the index to a more dense packed format.
|
void |
removeArtifactsFromIndex(ArchivaIndexingContext context,
Collection<URI> artifactReference)
Removes a list of artifacts from the index.
|
ArchivaIndexingContext |
reset(ArchivaIndexingContext context)
Reinitializes the index.
|
void |
scan(ArchivaIndexingContext context)
Rescans the whole repository, this index is associated to.
|
boolean |
supportsRepository(RepositoryType type)
Returns true, if this manager is able to apply the index actions for the given repository type.
|
void |
update(ArchivaIndexingContext context,
boolean fullUpdate)
Updates the index from the remote url.
|
void |
updateLocalIndexPath(Repository repo)
Returns the local path where the index is stored.
|
private final org.slf4j.Logger log
public static final String DEFAULT_INDEXER_DIR
public GenericIndexManager()
public void pack(ArchivaIndexingContext context)
ArchivaIndexManagerpack in interface ArchivaIndexManagerpublic void scan(ArchivaIndexingContext context)
ArchivaIndexManagerscan in interface ArchivaIndexManagerpublic void update(ArchivaIndexingContext context, boolean fullUpdate)
ArchivaIndexManagerupdate in interface ArchivaIndexManagerpublic void addArtifactsToIndex(ArchivaIndexingContext context, Collection<URI> artifactReference)
ArchivaIndexManageraddArtifactsToIndex in interface ArchivaIndexManagerpublic void removeArtifactsFromIndex(ArchivaIndexingContext context, Collection<URI> artifactReference)
ArchivaIndexManagerremoveArtifactsFromIndex in interface ArchivaIndexManagerpublic boolean supportsRepository(RepositoryType type)
ArchivaIndexManagersupportsRepository in interface ArchivaIndexManagerpublic ArchivaIndexingContext createContext(Repository repository)
ArchivaIndexManagercreateContext in interface ArchivaIndexManagerrepository - the repository for which the index context should be createdpublic ArchivaIndexingContext reset(ArchivaIndexingContext context) throws IndexUpdateFailedException
ArchivaIndexManagerreset in interface ArchivaIndexManagerIndexUpdateFailedExceptionpublic ArchivaIndexingContext move(ArchivaIndexingContext context, Repository repo) throws IndexCreationFailedException
ArchivaIndexManagermove in interface ArchivaIndexManagercontext - The current contextrepo - The repositoryIndexCreationFailedExceptionpublic void updateLocalIndexPath(Repository repo)
ArchivaIndexManagerupdateLocalIndexPath in interface ArchivaIndexManagerprivate Path getIndexPath(Repository repo) throws IOException
IOExceptionCopyright © 2006–2018 The Apache Software Foundation. All rights reserved.