Share via


WarehouseSyncJobExtension<TWarehouseAdapter> Class

Warehouse Job for a warehouse extension (adapter).

This manages initializing the warehouse extension and calling the warehouse extension methods (that is MakeSchemaChanges and MakeDataChanges). It will synchronize these calls with all other registered warehouse extensions.

There are potentially three threads running in this code. Each thread can only execute a limited number of methods.

Thread 1: Main thread - from Job Agent thread pool.

Executes RunInternal. Controls when other threads are active.

Thread 2: Schema Lock Time thread - started in MakeSchemaChanges and only calls CheckSchemaLockQueue. Requires valid adapter instance.

Thread 3: Request Context Cancel thread - from Request Context cancellation "notification" Only calls Cancel - only possibly active between calls to EnterCancelableRegion and ExitCancelableRegion. During Cancel TeamFoundationRequestContext locks Enter/ExitCancelableRegion calls (internal list tracking cancelable objects is locked).

Locking is here to handle the case when the Timer thread is trying to execute methods on the adapter after it has been disposed by the main thread.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.Warehouse.WarehouseJobExtension
    Microsoft.TeamFoundation.Warehouse.WarehouseSyncJobExtension<TWarehouseAdapter>

Namespace:  Microsoft.TeamFoundation.Warehouse
Assembly:  Microsoft.TeamFoundation.Warehouse (in Microsoft.TeamFoundation.Warehouse.dll)

Syntax

'Declaration
Public MustInherit Class WarehouseSyncJobExtension(Of TWarehouseAdapter As {New, WarehouseAdapter}) _
    Inherits WarehouseJobExtension _
    Implements ICancelable
public abstract class WarehouseSyncJobExtension<TWarehouseAdapter> : WarehouseJobExtension, 
    ICancelable 
where TWarehouseAdapter : new(), WarehouseAdapter
generic<typename TWarehouseAdapter>
where TWarehouseAdapter : gcnew(), WarehouseAdapter 
public ref class WarehouseSyncJobExtension abstract : public WarehouseJobExtension, 
    ICancelable
[<AbstractClass>]
type WarehouseSyncJobExtension<'TWarehouseAdapter when 'TWarehouseAdapter : new() and WarehouseAdapter> =  
    class 
        inherit WarehouseJobExtension 
        interface ICancelable 
    end
JScript does not support generic types or methods.

Type Parameters

  • TWarehouseAdapter

The WarehouseSyncJobExtension<TWarehouseAdapter> type exposes the following members.

Constructors

  Name Description
Protected method WarehouseSyncJobExtension<TWarehouseAdapter>

Top

Methods

  Name Description
Public method Cancel
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Run (Inherited from WarehouseJobExtension.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

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

Microsoft.TeamFoundation.Warehouse Namespace