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<org.eclipse.core.internal.jobs.InternalJob>
,IAdaptable
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
Modifier and TypeFieldDescriptionstatic final QualifiedName
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 final Object
An object representing the family of jobs that load repositories.static final QualifiedName
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 final QualifiedName
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 final QualifiedName
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
ConstructorDescriptionCreate a job that loads the metadata repositories known by the specified RepositoryTracker. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether this job belongs to the given family.void
Report the accumulated status for repository load failures.runModal
(IProgressMonitor monitor) Perform the specific work involved in running this job in the current thread.protected boolean
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, 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
-
Field Details
-
LOAD_FAMILY
An object representing the family of jobs that load repositories. -
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
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
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
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
Create a job that loads the metadata repositories known by the specified RepositoryTracker.- Parameters:
ui
- the ProvisioningUI providing the necessary services
-
-
Method Details
-
runModal
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 classProvisioningJob
- 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
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 returnfalse
for families they do not recognize.
-