Condividi tramite


SPUpgradeJobDefinition class

Represents a SharePoint Foundation upgrade job definition.

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.Administration.SPPersistedObject
      Microsoft.SharePoint.Administration.SPJobDefinition
        Microsoft.SharePoint.Administration.SPAdministrationServiceJobDefinition
          Microsoft.SharePoint.Administration.SPUpgradeJobDefinition

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<GuidAttribute("3144ED38-69E9-46ec-B89F-3037F8FFD1A8")> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPUpgradeJobDefinition _
    Inherits SPAdministrationServiceJobDefinition
'Usage
Dim instance As SPUpgradeJobDefinition
[GuidAttribute("3144ED38-69E9-46ec-B89F-3037F8FFD1A8")]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPUpgradeJobDefinition : SPAdministrationServiceJobDefinition

Remarks

Instances of this class are used to represent the job definition that is associated with an upgrade. The class is derived from the SPJobDefinition class. SPUpgradeJobDefinition objects can appear in the SPJobDefinitionCollection object that is associated with an SPTimerService object.

Use the constructor to create an instance of the SPUpgradeJobDefinition class. Specify the root object for the upgrade by setting the Object property. Specify the upgrade mode by setting the Mode property to in place. Add it to a job queue by calling the Add method of the appropriate job definition collection.

When an upgrade timer job is executing, you can use the SPUpgradeSession object associated with this job to monitor the progress. Retrieve the SPUpgradeSession object from the SessionId property to get the object ID, and then call GetObject() to obtain the object.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also

Reference

SPUpgradeJobDefinition members

Microsoft.SharePoint.Administration namespace

Microsoft.SharePoint.Upgrade.SPManager

SPJobDefinition

Other resources

Upgrade Overview

Upgrade Definition Files