Class LoadMetadataRepositoryJob

java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.core.internal.jobs.InternalJob
All Implemented Interfaces:
Comparable<org.eclipse.core.internal.jobs.InternalJob>, 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 Details

    • 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 Details

    • 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 Details

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