Class ComputeResources
- java.lang.Object
-
- com.netflix.genie.common.internal.dtos.ComputeResources
-
- All Implemented Interfaces:
java.io.Serializable
public class ComputeResources extends java.lang.Object implements java.io.Serializable
A representation of compute resources that a Genie entity (job/command/etc.) may request or use.- Since:
- 4.3.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ComputeResources.Builder
Builder for generating immutableComputeResources
instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.Optional<java.lang.Integer>
getCpu()
Get the number of CPUs.java.util.Optional<java.lang.Long>
getDiskMb()
Get the amount of disk space.java.util.Optional<java.lang.Integer>
getGpu()
Get the number of GPUs.java.util.Optional<java.lang.Long>
getMemoryMb()
Get the amount of memory.java.util.Optional<java.lang.Long>
getNetworkMbps()
Get the network bandwidth size.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getCpu
public java.util.Optional<java.lang.Integer> getCpu()
Get the number of CPUs.- Returns:
- The amount or
Optional.empty()
-
getGpu
public java.util.Optional<java.lang.Integer> getGpu()
Get the number of GPUs.- Returns:
- The amount or
Optional.empty()
-
getMemoryMb
public java.util.Optional<java.lang.Long> getMemoryMb()
Get the amount of memory.- Returns:
- The amount or
Optional.empty()
-
getDiskMb
public java.util.Optional<java.lang.Long> getDiskMb()
Get the amount of disk space.- Returns:
- The amount or
Optional.empty()
-
getNetworkMbps
public java.util.Optional<java.lang.Long> getNetworkMbps()
Get the network bandwidth size.- Returns:
- The size or
Optional.empty()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-