Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ivy.core.repository
Class RepositoryManagementEngine

    java.lang.Object
      org.apache.ivy.core.repository.RepositoryManagementEngine

    public class RepositoryManagementEngine

extends java.lang.Object

The repository management can be used to load all metadata from a repository, analyze them, and provide a bunch of information about the whole repository state.

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.
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RepositoryManagementEngine

    public RepositoryManagementEngine(RepositoryManagementEngineSettings settings,
                                      SearchEngine searchEngine,
                                      ResolveEngine resolveEngine)

Method Detail

### 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:
    `java.lang.IllegalStateException` - if the repository has not been loaded yet
  See Also:
    `load()`

### getRevisionsNumber

    public int getRevisionsNumber()

  Returns the number of Module Revision in the repository.

  Returns:
    the number of module revisions in the repository.
  Throws:
    `java.lang.IllegalStateException` - if the repository has not been loaded yet
  See Also:
    `load()`

### getModuleIdsNumber

    public int getModuleIdsNumber()

  Returns the number of ModuleId in the repository.

  Returns:
    the number of ModuleId in the repository.
  Throws:
    `java.lang.IllegalStateException` - if the repository has not been loaded yet
  See Also:
    `load()`

### getOrphans

    public java.util.Collection 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:
    `java.lang.IllegalStateException` - if the repository has not been analyzed yet
  See Also:
    `analyze()`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD