target.apidocs.com.google.api.services.compute.model.Scheduling.html Maven / Gradle / Ivy
Scheduling (Compute Engine API v1-rev20200104-1.30.8)
com.google.api.services.compute.model
Class Scheduling
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.Scheduling
-
public final class Scheduling
extends GenericJson
Sets the scheduling options for an Instance. NextID: 9
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Scheduling()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Scheduling
clone()
Boolean
getAutomaticRestart()
Specifies whether the instance should be automatically restarted if it is terminated by Compute
Engine (not terminated by a user).
List<SchedulingNodeAffinity>
getNodeAffinities()
A set of node affinity and anti-affinity configurations.
String
getOnHostMaintenance()
Defines the maintenance behavior for this instance.
Boolean
getPreemptible()
Defines whether the instance is preemptible.
Scheduling
set(String fieldName,
Object value)
Scheduling
setAutomaticRestart(Boolean automaticRestart)
Specifies whether the instance should be automatically restarted if it is terminated by Compute
Engine (not terminated by a user).
Scheduling
setNodeAffinities(List<SchedulingNodeAffinity> nodeAffinities)
A set of node affinity and anti-affinity configurations.
Scheduling
setOnHostMaintenance(String onHostMaintenance)
Defines the maintenance behavior for this instance.
Scheduling
setPreemptible(Boolean preemptible)
Defines whether the instance is preemptible.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAutomaticRestart
public Boolean getAutomaticRestart()
Specifies whether the instance should be automatically restarted if it is terminated by Compute
Engine (not terminated by a user). You can only set the automatic restart option for standard
instances. Preemptible instances cannot be automatically restarted.
By default, this is set to true so an instance is automatically restarted if it is terminated
by Compute Engine.
- Returns:
- value or
null for none
-
setAutomaticRestart
public Scheduling setAutomaticRestart(Boolean automaticRestart)
Specifies whether the instance should be automatically restarted if it is terminated by Compute
Engine (not terminated by a user). You can only set the automatic restart option for standard
instances. Preemptible instances cannot be automatically restarted.
By default, this is set to true so an instance is automatically restarted if it is terminated
by Compute Engine.
- Parameters:
automaticRestart - automaticRestart or null for none
-
getNodeAffinities
public List<SchedulingNodeAffinity> getNodeAffinities()
A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for
more information.
- Returns:
- value or
null for none
-
setNodeAffinities
public Scheduling setNodeAffinities(List<SchedulingNodeAffinity> nodeAffinities)
A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for
more information.
- Parameters:
nodeAffinities - nodeAffinities or null for none
-
getOnHostMaintenance
public String getOnHostMaintenance()
Defines the maintenance behavior for this instance. For standard instances, the default
behavior is MIGRATE. For preemptible instances, the default and only possible behavior is
TERMINATE. For more information, see Setting Instance Scheduling Options.
- Returns:
- value or
null for none
-
setOnHostMaintenance
public Scheduling setOnHostMaintenance(String onHostMaintenance)
Defines the maintenance behavior for this instance. For standard instances, the default
behavior is MIGRATE. For preemptible instances, the default and only possible behavior is
TERMINATE. For more information, see Setting Instance Scheduling Options.
- Parameters:
onHostMaintenance - onHostMaintenance or null for none
-
getPreemptible
public Boolean getPreemptible()
Defines whether the instance is preemptible. This can only be set during instance creation, it
cannot be set or changed after the instance has been created.
- Returns:
- value or
null for none
-
setPreemptible
public Scheduling setPreemptible(Boolean preemptible)
Defines whether the instance is preemptible. This can only be set during instance creation, it
cannot be set or changed after the instance has been created.
- Parameters:
preemptible - preemptible or null for none
-
set
public Scheduling set(String fieldName,
Object value)
- Overrides:
set in class GenericJson
-
clone
public Scheduling clone()
- Overrides:
clone in class GenericJson
Copyright © 2011–2020 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy