com.baidubce.services.batch
Class BatchClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.batch.BatchClient

public class BatchClient
extends AbstractBceClient

Provides the client for accessing the Baidu Batch-Compute service.


Field Summary
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
BatchClient()
          Constructs a new client to invoke service methods on Batch-Compute.
BatchClient(BceClientConfiguration clientConfiguration)
          Constructs a new client using the client configuration to access Batch-Compute.
 
Method Summary
 void cancelJob(CancelJobRequest request)
          Cancel a Batch-Compute job.
 void cancelJob(String jobId)
          Cancel a Batch-Compute job.
 CreateJobResponse createJob(CreateJobRequest request)
          Create a Batch-Compute job with the specified options.
 GetJobResponse getJob(GetJobRequest request)
          Describe the detail information of the target job.
 GetJobResponse getJob(String jobId)
          Describe the detail information of the target job.
 ListJobsResponse listJobs()
          List Batch-Compute jobs owned by the authenticated user.
 ListJobsResponse listJobs(int maxKeys)
          List Batch-Compute jobs owned by the authenticated user.
 ListJobsResponse listJobs(ListJobsRequest request)
          List Batch-Compute jobs owned by the authenticated user.
 ListJobsResponse listJobs(String marker, int maxKeys)
          List Batch-Compute jobs owned by the authenticated user.
 
Methods inherited from class com.baidubce.AbstractBceClient
getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchClient

public BatchClient()
Constructs a new client to invoke service methods on Batch-Compute.


BatchClient

public BatchClient(BceClientConfiguration clientConfiguration)
Constructs a new client using the client configuration to access Batch-Compute.

Parameters:
clientConfiguration - The BCE client configuration options.
Method Detail

listJobs

public ListJobsResponse listJobs(ListJobsRequest request)
List Batch-Compute jobs owned by the authenticated user.

Users must authenticate with a valid BCE Access Key ID, and the response contains all the Batch-Compute jobs owned by the user.

Parameters:
request - The request containing valid query parameters.
Returns:
The response containing a list of the Batch-Compute jobs owned by the authenticated sender of the request.

listJobs

public ListJobsResponse listJobs()
List Batch-Compute jobs owned by the authenticated user.

Returns:
The response containing a list of the Batch-Compute jobs owned by the authenticated sender of the request.

listJobs

public ListJobsResponse listJobs(int maxKeys)
List Batch-Compute jobs owned by the authenticated user.

Parameters:
maxKeys - The maximum number of jobs returned.
Returns:
The response containing a list of the Batch-Compute jobs owned by the authenticated sender of the request. And the size of list is limited below maxKeys.

listJobs

public ListJobsResponse listJobs(String marker,
                                 int maxKeys)
List Batch-Compute jobs owned by the authenticated user.

Parameters:
marker - The start record of jobs.
maxKeys - The maximum number of jobs returned.
Returns:
The response containing a list of the Batch-Compute jobs owned by the authenticated sender of the request. The jobs' records start from the marker and the size of list is limited below maxKeys.

getJob

public GetJobResponse getJob(GetJobRequest request)
Describe the detail information of the target job.

Parameters:
request - The request object containing the ID of the target job.
Returns:
response containing the detail information of the target job.

getJob

public GetJobResponse getJob(String jobId)
Describe the detail information of the target job.

Parameters:
jobId - The ID of the target job.
Returns:
The response containing the detail information of the target job.

createJob

public CreateJobResponse createJob(CreateJobRequest request)
Create a Batch-Compute job with the specified options.

Parameters:
request - The request containing all options for creating a Batch-Compute job.
Returns:
The response containing the ID of the newly created job.

cancelJob

public void cancelJob(CancelJobRequest request)
Cancel a Batch-Compute job.

Parameters:
request - The request containing the ID of the job to be cancelled.

cancelJob

public void cancelJob(String jobId)
Cancel a Batch-Compute job.

Parameters:
jobId - The ID of the job to be cancelled.


Copyright © 2018. All rights reserved.