org.apache.ivy.core.repository
public class RepositoryManagementEngine extends Object
Since loading all metadata from a repository is not a light task, this engine should only be used on a machine having good access to the repository (on the same filesystem being usually the best suited).
To access information, you usually have before to call a method to init the data: load is used to load repository metadata, analyze is used to analyze them. These methods being very time consuming, they must always be called explicitly.
On a large repository, this engine can be very memory consuming to use, it is not suited to be used in a long running process, but rather in short process loading data and taking action about the current state of the repository.
This engine is not intended to be used concurrently with publish, the order of repository loaded being undeterministic and long, it could end up in having an inconsistent in memory state.
For better performance, we strongly suggest using this engine with cache in useOrigin mode.
Constructor Summary | |
---|---|
RepositoryManagementEngine(RepositoryManagementEngineSettings settings, SearchEngine searchEngine, ResolveEngine resolveEngine) |
Method Summary | |
---|---|
void | analyze()
Analyze data in the repository.
|
int | getModuleIdsNumber()
Returns the number of ModuleId in the repository.
|
Collection | getOrphans()
Returns Module Revisions which have no dependers.
|
int | getRevisionsNumber()
Returns the number of Module Revision in the repository.
|
void | load()
Loads data from the repository.
|
This method may take a long time to proceed. It should never be called from event dispatch thread in a GUI.
Throws: IllegalStateException if the repository has not been loaded yet
See Also: load
Returns: the number of ModuleId in the repository.
Throws: IllegalStateException if the repository has not been loaded yet
See Also: load
Returns: a Collection of the ModuleRevisionId of module revisions which have no dependers in the repository.
Throws: IllegalStateException if the repository has not been analyzed yet
See Also: analyze
Returns: the number of module revisions in the repository.
Throws: IllegalStateException if the repository has not been loaded yet
See Also: load
This method usually takes a long time to proceed. It should never be called from event dispatch thread in a GUI.