Share via


Cluster.ListJobsWithPaging Method

Retrieves all jobs in the cluster that were submitted by the specified user and that have the specified status. The jobs are returned in blocks of jobs from a specified snapshot of the cluster.

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

Usage

Syntax

'Declaration
Public Function ListJobsWithPaging ( _
    submittedBy As String, _
    status As JobStatus, _
    withTasks As Boolean, _
    ByRef timestamp As Object, _
    ByRef version As Object, _
    pageSize As Integer _
) As IClusterEnumerable
public IClusterEnumerable ListJobsWithPaging (
    string submittedBy,
    JobStatus status,
    bool withTasks,
    ref Object timestamp,
    ref Object version,
    int pageSize
)
public:
virtual IClusterEnumerable^ ListJobsWithPaging (
    String^ submittedBy, 
    JobStatus status, 
    bool withTasks, 
    Object^% timestamp, 
    Object^% version, 
    int pageSize
) sealed
public final IClusterEnumerable ListJobsWithPaging (
    String submittedBy, 
    JobStatus status, 
    boolean withTasks, 
    /** @ref */ Object timestamp, 
    /** @ref */ Object version, 
    int pageSize
)

Parameters

  • submittedBy
    The name of the user that submitted the job. The name is in the form domain\username. If NULL or "", the method retrieves all jobs with the specified status.
  • status
    The job status. For a list of values, see JobStatus.
  • withTasks
    Specify true to retrieve only jobs that contain tasks; otherwise, false.
  • timestamp
    The opaque value used by the method to track the jobs 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 jobs to retrieve. The minimum number of jobs 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 IJob interfaces. The enumerable object is empty when there are no jobs to return.

Remarks

If there are more than 2,000 jobs in the cluster or if your application requires quick response time, consider calling this method instead of calling the Cluster.ListJobs method.

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 jobs and returns the requested number of jobs. The loop ends when the enumerable object is empty.

To get the delta of the jobs that were added or whose state has changed since the last snapshot, set version to NULL, but leave timestamp 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

Cluster Class
Cluster Members
Microsoft.ComputeCluster Namespace
Cluster.ListAllJobsWithPaging Method
Cluster.ListJobs Method