Cluster.ListAllJobsWithPaging Method
Retrieves all jobs in the cluster. 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 ListAllJobsWithPaging ( _
withTasks As Boolean, _
ByRef timestamp As Object, _
ByRef version As Object, _
pageSize As Integer _
) As IClusterEnumerable
public IClusterEnumerable ListAllJobsWithPaging (
bool withTasks,
ref Object timestamp,
ref Object version,
int pageSize
)
public:
virtual IClusterEnumerable^ ListAllJobsWithPaging (
bool withTasks,
Object^% timestamp,
Object^% version,
int pageSize
) sealed
public final IClusterEnumerable ListAllJobsWithPaging (
boolean withTasks,
/** @ref */ Object timestamp,
/** @ref */ Object version,
int pageSize
)
Parameters
- 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 left 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.ListAllJobs 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 the version parameter to NULL, but leave the timestamp parameter unchanged.
To reset the snapshot to the beginning, set the timestamp parameter to NULL, but leave the version parameter unchanged.
To determine the total number of jobs in the cluster, access the Cluster.ClusterCounter property and then the ClusterCounter.TotalNumberOfJobs property.
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.ListAllJobs Method
ListJobsWithPaging