@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)
ArchivaIndexManager
pack
in interface ArchivaIndexManager
public void scan(ArchivaIndexingContext context)
ArchivaIndexManager
scan
in interface ArchivaIndexManager
public void update(ArchivaIndexingContext context, boolean fullUpdate)
ArchivaIndexManager
update
in interface ArchivaIndexManager
public void addArtifactsToIndex(ArchivaIndexingContext context, Collection<URI> artifactReference)
ArchivaIndexManager
addArtifactsToIndex
in interface ArchivaIndexManager
public void removeArtifactsFromIndex(ArchivaIndexingContext context, Collection<URI> artifactReference)
ArchivaIndexManager
removeArtifactsFromIndex
in interface ArchivaIndexManager
public boolean supportsRepository(RepositoryType type)
ArchivaIndexManager
supportsRepository
in interface ArchivaIndexManager
public ArchivaIndexingContext createContext(Repository repository)
ArchivaIndexManager
createContext
in interface ArchivaIndexManager
repository
- the repository for which the index context should be createdpublic ArchivaIndexingContext reset(ArchivaIndexingContext context) throws IndexUpdateFailedException
ArchivaIndexManager
reset
in interface ArchivaIndexManager
IndexUpdateFailedException
public ArchivaIndexingContext move(ArchivaIndexingContext context, Repository repo) throws IndexCreationFailedException
ArchivaIndexManager
move
in interface ArchivaIndexManager
context
- The current contextrepo
- The repositoryIndexCreationFailedException
public void updateLocalIndexPath(Repository repo)
ArchivaIndexManager
updateLocalIndexPath
in interface ArchivaIndexManager
private Path getIndexPath(Repository repo) throws IOException
IOException
Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.