Share via


BatchPoolInfo Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchPoolInfo

Implements

public final class BatchPoolInfo
implements JsonSerializable<BatchPoolInfo>

Specifies how a Job should be assigned to a Pool.

Constructor Summary

Constructor Description
BatchPoolInfo()

Creates an instance of BatchPoolInfo class.

Method Summary

Modifier and Type Method and Description
static BatchPoolInfo fromJson(JsonReader jsonReader)

Reads an instance of BatchPoolInfo from the JsonReader.

BatchAutoPoolSpecification getAutoPoolSpecification()

Get the autoPoolSpecification property: Characteristics for a temporary 'auto pool'.

String getPoolId()

Get the poolId property: The ID of an existing Pool.

BatchPoolInfo setAutoPoolSpecification(BatchAutoPoolSpecification autoPoolSpecification)

Set the autoPoolSpecification property: Characteristics for a temporary 'auto pool'.

BatchPoolInfo setPoolId(String poolId)

Set the poolId property: The ID of an existing Pool.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

BatchPoolInfo

public BatchPoolInfo()

Creates an instance of BatchPoolInfo class.

Method Details

fromJson

public static BatchPoolInfo fromJson(JsonReader jsonReader)

Reads an instance of BatchPoolInfo from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BatchPoolInfo if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the BatchPoolInfo.

getAutoPoolSpecification

public BatchAutoPoolSpecification getAutoPoolSpecification()

Get the autoPoolSpecification property: Characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when the Job is submitted. If auto Pool creation fails, the Batch service moves the Job to a completed state, and the Pool creation error is set in the Job's scheduling error property. The Batch service manages the lifetime (both creation and, unless keepAlive is specified, deletion) of the auto Pool. Any user actions that affect the lifetime of the auto Pool while the Job is active will result in unexpected behavior. You must specify either the Pool ID or the auto Pool specification, but not both.

Returns:

the autoPoolSpecification value.

getPoolId

public String getPoolId()

Get the poolId property: The ID of an existing Pool. All the Tasks of the Job will run on the specified Pool. You must ensure that the Pool referenced by this property exists. If the Pool does not exist at the time the Batch service tries to schedule a Job, no Tasks for the Job will run until you create a Pool with that id. Note that the Batch service will not reject the Job request; it will simply not run Tasks until the Pool exists. You must specify either the Pool ID or the auto Pool specification, but not both.

Returns:

the poolId value.

setAutoPoolSpecification

public BatchPoolInfo setAutoPoolSpecification(BatchAutoPoolSpecification autoPoolSpecification)

Set the autoPoolSpecification property: Characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when the Job is submitted. If auto Pool creation fails, the Batch service moves the Job to a completed state, and the Pool creation error is set in the Job's scheduling error property. The Batch service manages the lifetime (both creation and, unless keepAlive is specified, deletion) of the auto Pool. Any user actions that affect the lifetime of the auto Pool while the Job is active will result in unexpected behavior. You must specify either the Pool ID or the auto Pool specification, but not both.

Parameters:

autoPoolSpecification - the autoPoolSpecification value to set.

Returns:

the BatchPoolInfo object itself.

setPoolId

public BatchPoolInfo setPoolId(String poolId)

Set the poolId property: The ID of an existing Pool. All the Tasks of the Job will run on the specified Pool. You must ensure that the Pool referenced by this property exists. If the Pool does not exist at the time the Batch service tries to schedule a Job, no Tasks for the Job will run until you create a Pool with that id. Note that the Batch service will not reject the Job request; it will simply not run Tasks until the Pool exists. You must specify either the Pool ID or the auto Pool specification, but not both.

Parameters:

poolId - the poolId value to set.

Returns:

the BatchPoolInfo object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to