Package org.eclipse.equinox.p2.ui

## Class LoadMetadataRepositoryJob

- java.lang.Object
- - org.eclipse.core.runtime.PlatformObject
  - - org.eclipse.core.internal.jobs.InternalJob
    - - org.eclipse.core.runtime.jobs.Job
      - - org.eclipse.equinox.p2.operations.ProvisioningJob
        - - org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob

All Implemented Interfaces:
  `Comparable`, `IAdaptable`

    public class LoadMetadataRepositoryJob
    extends ProvisioningJob

A job that loads a set of metadata repositories and caches the loaded repositories. This job can be used when repositories are loaded by a client who wishes to maintain (and pass along) the in-memory references to the repositories. For example, repositories can be loaded in the background and then passed to another component, thus ensuring that the repositories remain loaded in memory.

Since:
  2.0
Restriction:
  This class is not intended to be subclassed by clients.

### Field Summary

Fields
`static QualifiedName` `ACCUMULATE_LOAD_ERRORS` The key that should be used to set a property on a repository load job to indicate that load errors should be accumulated into a single status rather than reported as they occur.
`static Object` `LOAD_FAMILY` An object representing the family of jobs that load repositories.
`static QualifiedName` `SUPPRESS_AUTHENTICATION_JOB_MARKER` The key that should be used to set a property on a repository load job to indicate that authentication should be suppressed when loading the repositories.
`static QualifiedName` `SUPPRESS_REPOSITORY_EVENTS` The key that should be used to set a property on a repository load job to indicate that repository events triggered by this job should be suppressed so that clients will ignore all events related to the load.
`static QualifiedName` `WIZARD_CLIENT_SHOULD_SCHEDULE` The key that should be used to set a property on a repository load job to indicate that a wizard receiving this job needs to schedule it.

### Fields inherited from class org.eclipse.equinox.p2.operations.ProvisioningJob

`RESTART_NONE, RESTART_ONLY, RESTART_OR_APPLY`

### Fields inherited from class org.eclipse.core.runtime.jobs.Job

`ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING`

### Fields inherited from class org.eclipse.core.internal.jobs.InternalJob

`manager`

### Constructor Summary

Constructors
`LoadMetadataRepositoryJob​(ProvisioningUI ui)` Create a job that loads the metadata repositories known by the specified RepositoryTracker.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `belongsTo​(Object family)` Returns whether this job belongs to the given family.
`void` `reportAccumulatedStatus()` Report the accumulated status for repository load failures.
`IStatus` `runModal​(IProgressMonitor monitor)` Perform the specific work involved in running this job in the current thread.
`protected boolean` `shouldAccumulateFailures()`

### Methods inherited from class org.eclipse.equinox.p2.operations.ProvisioningJob

`getErrorStatus, getRestartPolicy, getSession, run, setAdditionalProgressMonitor`

### Methods inherited from class org.eclipse.core.runtime.jobs.Job

`addJobChangeListener, cancel, canceling, create, create, createSystem, createSystem, createSystem, done, getJobGroup, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, join, removeJobChangeListener, schedule, schedule, setJobGroup, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRule`

### Methods inherited from class org.eclipse.core.internal.jobs.InternalJob

`compareTo`

### Methods inherited from class org.eclipse.core.runtime.PlatformObject

`getAdapter`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

`getAdapter`

### Field Detail

#### LOAD_FAMILY

    public static final Object LOAD_FAMILY

An object representing the family of jobs that load repositories.

#### SUPPRESS_AUTHENTICATION_JOB_MARKER

    public static final QualifiedName SUPPRESS_AUTHENTICATION_JOB_MARKER

The key that should be used to set a property on a repository load job to indicate that authentication should be suppressed when loading the repositories.

#### SUPPRESS_REPOSITORY_EVENTS

    public static final QualifiedName SUPPRESS_REPOSITORY_EVENTS

The key that should be used to set a property on a repository load job to indicate that repository events triggered by this job should be suppressed so that clients will ignore all events related to the load.

#### WIZARD_CLIENT_SHOULD_SCHEDULE

    public static final QualifiedName WIZARD_CLIENT_SHOULD_SCHEDULE

The key that should be used to set a property on a repository load job to indicate that a wizard receiving this job needs to schedule it. In some cases, a load job is finished before invoking a wizard. In other cases, the job has not yet been scheduled so that listeners can be set up first.

#### ACCUMULATE_LOAD_ERRORS

    public static final QualifiedName ACCUMULATE_LOAD_ERRORS

The key that should be used to set a property on a repository load job to indicate that load errors should be accumulated into a single status rather than reported as they occur.

### Constructor Detail

#### LoadMetadataRepositoryJob

    public LoadMetadataRepositoryJob​(ProvisioningUI ui)

Create a job that loads the metadata repositories known by the specified RepositoryTracker.

Parameters:
  `ui` - the ProvisioningUI providing the necessary services

### Method Detail

#### runModal

    public IStatus runModal​(IProgressMonitor monitor)

Description copied from class: `ProvisioningJob`
Perform the specific work involved in running this job in the current thread. This method can be called directly by clients, or in the course of running the job in the background.

Specified by:
  `runModal` in class `ProvisioningJob`
Parameters:
  `monitor` - the progress monitor to use for the operation
Returns:
  a status indicating the result of the operation.

#### shouldAccumulateFailures

    protected boolean shouldAccumulateFailures()

#### reportAccumulatedStatus

    public void reportAccumulatedStatus()

Report the accumulated status for repository load failures. If there has been no status accumulated, or if the job has been cancelled, do not report anything. Detailed errors have already been logged.

#### belongsTo

    public boolean belongsTo​(Object family)

Description copied from class: `Job`
Returns whether this job belongs to the given family. Job families are represented as objects that are not interpreted or specified in any way by the job manager. Thus, a job can choose to belong to any number of families.

Clients may override this method. This default implementation always returns `false`. Overriding implementations must return `false` for families they do not recognize.

Overrides:
  `belongsTo` in class `Job`
Parameters:
  `family` - the job family identifier
Returns:
  `true` if this job belongs to the given family, and `false` otherwise.