Share via


BatchNodePlacementConfiguration Class

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

Implements

public final class BatchNodePlacementConfiguration
implements JsonSerializable<BatchNodePlacementConfiguration>

For regional placement, nodes in the pool will be allocated in the same region. For zonal placement, nodes in the pool will be spread across different zones with best effort balancing.

Constructor Summary

Constructor Description
BatchNodePlacementConfiguration()

Creates an instance of BatchNodePlacementConfiguration class.

Method Summary

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

Reads an instance of BatchNodePlacementConfiguration from the JsonReader.

BatchNodePlacementPolicyType getPolicy()

Get the policy property: Node placement Policy type on Batch Pools.

BatchNodePlacementConfiguration setPolicy(BatchNodePlacementPolicyType policy)

Set the policy property: Node placement Policy type on Batch Pools.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

BatchNodePlacementConfiguration

public BatchNodePlacementConfiguration()

Creates an instance of BatchNodePlacementConfiguration class.

Method Details

fromJson

public static BatchNodePlacementConfiguration fromJson(JsonReader jsonReader)

Reads an instance of BatchNodePlacementConfiguration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BatchNodePlacementConfiguration 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 BatchNodePlacementConfiguration.

getPolicy

public BatchNodePlacementPolicyType getPolicy()

Get the policy property: Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy.

Returns:

the policy value.

setPolicy

public BatchNodePlacementConfiguration setPolicy(BatchNodePlacementPolicyType policy)

Set the policy property: Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy.

Parameters:

policy - the policy value to set.

Returns:

the BatchNodePlacementConfiguration object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to