public class RepositoryManagementEngine
extends java.lang.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 and Description |
---|
RepositoryManagementEngine(RepositoryManagementEngineSettings settings,
SearchEngine searchEngine,
ResolveEngine resolveEngine) |
Modifier and Type | Method and Description |
---|---|
void |
analyze()
Analyze data in the repository.
|
int |
getModuleIdsNumber()
Returns the number of ModuleId in the repository.
|
java.util.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.
|
public RepositoryManagementEngine(RepositoryManagementEngineSettings settings, SearchEngine searchEngine, ResolveEngine resolveEngine)
public void load()
This method usually takes a long time to proceed. It should never be called from event dispatch thread in a GUI.
public void analyze()
This method may take a long time to proceed. It should never be called from event dispatch thread in a GUI.
java.lang.IllegalStateException
- if the repository has not been loaded yetload()
public int getRevisionsNumber()
java.lang.IllegalStateException
- if the repository has not been loaded yetload()
public int getModuleIdsNumber()
java.lang.IllegalStateException
- if the repository has not been loaded yetload()
public java.util.Collection getOrphans()
ModuleRevisionId
of module revisions which have no
dependers in the repository.java.lang.IllegalStateException
- if the repository has not been analyzed yetanalyze()