Google Cloud Batch V1 Client - Class PlacementPolicy (0.14.0)

Reference documentation and code samples for the Google Cloud Batch V1 Client class PlacementPolicy.

PlacementPolicy describes a group placement policy for the VMs controlled by this AllocationPolicy.

Generated from protobuf message google.cloud.batch.v1.AllocationPolicy.PlacementPolicy

Namespace

Google \ Cloud \ Batch \ V1 \ AllocationPolicy

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ collocation string

UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be located close to each other for low network latency between the VMs. No placement policy will be generated when collocation is UNSPECIFIED.

↳ max_distance int|string

When specified, causes the job to fail if more than max_distance logical switches are required between VMs. Batch uses the most compact possible placement of VMs even when max_distance is not specified. An explicit max_distance makes that level of compactness a strict requirement. Not yet implemented

getCollocation

UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be located close to each other for low network latency between the VMs. No placement policy will be generated when collocation is UNSPECIFIED.

Returns
TypeDescription
string

setCollocation

UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be located close to each other for low network latency between the VMs. No placement policy will be generated when collocation is UNSPECIFIED.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMaxDistance

When specified, causes the job to fail if more than max_distance logical switches are required between VMs. Batch uses the most compact possible placement of VMs even when max_distance is not specified. An explicit max_distance makes that level of compactness a strict requirement.

Not yet implemented

Returns
TypeDescription
int|string

setMaxDistance

When specified, causes the job to fail if more than max_distance logical switches are required between VMs. Batch uses the most compact possible placement of VMs even when max_distance is not specified. An explicit max_distance makes that level of compactness a strict requirement.

Not yet implemented

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this