Class RepositoryManagementEngine
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 nondeterministic 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
ConstructorsConstructorDescriptionRepositoryManagementEngine
(RepositoryManagementEngineSettings settings, SearchEngine searchEngine, ResolveEngine resolveEngine) -
Method Summary
-
Constructor Details
-
RepositoryManagementEngine
public RepositoryManagementEngine(RepositoryManagementEngineSettings settings, SearchEngine searchEngine, ResolveEngine resolveEngine)
-
-
Method Details
-
load
public void load()Loads data from the repository.This method usually takes a long time to proceed. It should never be called from event dispatch thread in a GUI.
-
analyze
public void analyze()Analyze data in 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:
-
getRevisionsNumber
public int getRevisionsNumber()Returns the number of Module Revision in the repository.- Returns:
- the number of module revisions in the repository.
- Throws:
IllegalStateException
- if the repository has not been loaded yet- See Also:
-
getModuleIdsNumber
public int getModuleIdsNumber()Returns the number of ModuleId in the repository.- Returns:
- the number of ModuleId in the repository.
- Throws:
IllegalStateException
- if the repository has not been loaded yet- See Also:
-
getOrphans
Returns Module Revisions which have no dependers.- 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:
-