Class V1beta2ResourceClaimStatus
java.lang.Object
io.kubernetes.client.openapi.models.V1beta2ResourceClaimStatus
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-05-20T20:47:13.890592Z[Etc/UTC]",
comments="Generator version: 7.13.0")
public class V1beta2ResourceClaimStatus
extends Object
ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDevicesItem
(V1beta2AllocatedDeviceStatus devicesItem) addReservedForItem
(V1beta2ResourceClaimConsumerReference reservedForItem) allocation
(V1beta2AllocationResult allocation) devices
(List<V1beta2AllocatedDeviceStatus> devices) boolean
static V1beta2ResourceClaimStatus
Create an instance of V1beta2ResourceClaimStatus given an JSON stringGet allocationDevices contains the status of each device allocated for this claim, as reported by the driver.ReservedFor indicates which entities are currently allowed to use the claim.int
hashCode()
reservedFor
(List<V1beta2ResourceClaimConsumerReference> reservedFor) void
setAllocation
(V1beta2AllocationResult allocation) void
setDevices
(List<V1beta2AllocatedDeviceStatus> devices) void
setReservedFor
(List<V1beta2ResourceClaimConsumerReference> reservedFor) toJson()
Convert an instance of V1beta2ResourceClaimStatus to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ALLOCATION
- See Also:
-
SERIALIZED_NAME_DEVICES
- See Also:
-
SERIALIZED_NAME_RESERVED_FOR
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1beta2ResourceClaimStatus
public V1beta2ResourceClaimStatus()
-
-
Method Details
-
allocation
-
getAllocation
Get allocation- Returns:
- allocation
-
setAllocation
-
devices
-
addDevicesItem
-
getDevices
Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.- Returns:
- devices
-
setDevices
-
reservedFor
public V1beta2ResourceClaimStatus reservedFor(@Nullable List<V1beta2ResourceClaimConsumerReference> reservedFor) -
addReservedForItem
public V1beta2ResourceClaimStatus addReservedForItem(V1beta2ResourceClaimConsumerReference reservedForItem) -
getReservedFor
ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated. In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled. Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again. There can be at most 256 such reservations. This may get increased in the future, but not reduced.- Returns:
- reservedFor
-
setReservedFor
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to V1beta2ResourceClaimStatus
-
fromJson
Create an instance of V1beta2ResourceClaimStatus given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1beta2ResourceClaimStatus
- Throws:
IOException
- if the JSON string is invalid with respect to V1beta2ResourceClaimStatus
-
toJson
Convert an instance of V1beta2ResourceClaimStatus to an JSON string- Returns:
- JSON string
-