Package com.netflix.genie.common.dto
Class RuntimeResources.Builder
java.lang.Object
com.netflix.genie.common.dto.RuntimeResources.Builder
- Enclosing class:
- RuntimeResources
Builder for generating immutable
RuntimeResources
instances.- Since:
- 4.3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a new immutableRuntimeResources
instance based on the current state of this builder instance.Set the number of CPUs.withDiskMb
(Long diskMb) Set amount of disk space in MB.Set the number of GPUs.withMemoryMb
(Long memoryMb) Set amount of memory in MB.withNetworkMbps
(Long networkMbps) Set amount of network bandwidth in Mbps.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withCpu
Set the number of CPUs.- Parameters:
cpu
- The number must be at least 1 or null- Returns:
- The
RuntimeResources.Builder
-
withGpu
Set the number of GPUs.- Parameters:
gpu
- The number must be at least 1 or null- Returns:
- The
RuntimeResources.Builder
-
withMemoryMb
Set amount of memory in MB.- Parameters:
memoryMb
- The number must be at least 1 or null- Returns:
- The
RuntimeResources.Builder
-
withDiskMb
Set amount of disk space in MB.- Parameters:
diskMb
- The number must be at least 1 or null- Returns:
- The
RuntimeResources.Builder
-
withNetworkMbps
Set amount of network bandwidth in Mbps.- Parameters:
networkMbps
- The number must be at least 1 or null- Returns:
- The
RuntimeResources.Builder
-
build
Create a new immutableRuntimeResources
instance based on the current state of this builder instance.- Returns:
- A
RuntimeResources
instance
-