Share via


ICluster.ListTasksWithPaging Method

Retrieves all tasks in the specified job. The tasks are returned in blocks of tasks from a specified snapshot of the job.

Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)

Usage

Syntax

'Declaration
Function ListTasksWithPaging ( _
    jobId As Integer, _
    ByRef timestamp As Object, _
    ByRef version As Object, _
    pageSize As Integer _
) As IClusterEnumerable
IClusterEnumerable ListTasksWithPaging (
    int jobId,
    ref Object timestamp,
    ref Object version,
    int pageSize
)
IClusterEnumerable^ ListTasksWithPaging (
    int jobId, 
    Object^% timestamp, 
    Object^% version, 
    int pageSize
)
IClusterEnumerable ListTasksWithPaging (
    int jobId, 
    /** @ref */ Object timestamp, 
    /** @ref */ Object version, 
    int pageSize
)

Parameters

  • jobId
    The identifier of the job whose tasks you want to retrieve. The ICluster.AddJob method returns this value. If you have an instance of the job that has already been added to the cluster, you can access the IJob.Id property to get the identifier.
  • timestamp
    The opaque value used by the method to track the tasks that have been returned. Set to NULL on first call. See Remarks for details.
  • version
    The opaque value used by the method to track the snapshot of the list. Set to NULL on first call. See Remarks for details.
  • pageSize
    The number of tasks to retrieve. The minimum number of tasks to retrieve is 1, and the maximum is 10,000. If the value is outside this range, the method uses 10,000.

Return Value

An IClusterEnumerable interface that contains a collection of ITask interfaces. The enumerable object is empty when there are no tasks to return.

Remarks

This method is meant to be called in a loop. Set the timestamp and version parameters to NULL on the first call and do not change their values on subsequent calls. The first call takes a snapshot of the list of tasks and returns the requested number of tasks. The loop ends when the enumerable object is empty.

To get the delta of the tasks that were added or whose state has changed since the last snapshot, set version to NULL, but leave the timestamp value unchanged.

To reset the snapshot to the beginning, set timestamp to NULL, but leave version unchanged.

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.

Platforms

Development Platforms

Microsoft Windows Compute Cluster Server 2003, Windows Server 2003, Windows XP

Target Platforms

Microsoft Windows Compute Cluster Server 2003, Windows Server 2003 with Compute Cluster Pack Client Utilities, Windows XP with Compute Cluster Pack Client Utilities

See Also

Reference

ICluster Interface
ICluster Members
Microsoft.ComputeCluster Namespace
ICluster.ListTasks Method
ICluster.ListTasksOnNode Method
IJob.GetEnumerator