java.lang.Comparable<ResourceInformation>public class ResourceInformation extends java.lang.Object implements java.lang.Comparable<ResourceInformation>
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
DISKS_URI |
|
static java.lang.String |
FPGA_URI |
|
static ResourceInformation |
FPGAS |
|
static java.lang.String |
GPU_URI |
|
static ResourceInformation |
GPUS |
|
static ResourceInformation |
MEMORY_MB |
|
static java.lang.String |
MEMORY_URI |
|
static java.util.Map<java.lang.String,ResourceInformation> |
SPECIAL_RESOURCES |
Special resources that should be treated separately
from arbitrary resource types.
|
static ResourceInformation |
VCORES |
|
static java.lang.String |
VCORES_URI |
| Constructor | Description |
|---|---|
ResourceInformation() |
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(ResourceInformation other) |
|
static void |
copy(ResourceInformation src,
ResourceInformation dst) |
Copies the content of the source ResourceInformation object to the
destination object, overwriting all properties of the destination object.
|
boolean |
equals(java.lang.Object obj) |
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes() |
Get the attributes of the resource.
|
long |
getMaximumAllocation() |
Get the maximum allocation for the resource.
|
long |
getMinimumAllocation() |
Get the minimum allocation for the resource.
|
java.lang.String |
getName() |
Get the name for the resource.
|
ResourceTypes |
getResourceType() |
Get the resource type.
|
java.lang.String |
getShorthandRepresentation() |
|
java.util.Set<java.lang.String> |
getTags() |
Get resource tags.
|
java.lang.String |
getUnits() |
Get units for the resource.
|
long |
getValue() |
Get the value for the resource.
|
int |
hashCode() |
|
static ResourceInformation |
newInstance(java.lang.String name) |
|
static ResourceInformation |
newInstance(java.lang.String name,
long value) |
|
static ResourceInformation |
newInstance(java.lang.String name,
java.lang.String units) |
|
static ResourceInformation |
newInstance(java.lang.String name,
java.lang.String units,
long value) |
|
static ResourceInformation |
newInstance(java.lang.String name,
java.lang.String units,
long minRes,
long maxRes) |
|
static ResourceInformation |
newInstance(java.lang.String name,
java.lang.String units,
long value,
java.util.Set<java.lang.String> tags,
java.util.Map<java.lang.String,java.lang.String> attributes) |
|
static ResourceInformation |
newInstance(java.lang.String name,
java.lang.String units,
long value,
ResourceTypes type,
long minimumAllocation,
long maximumAllocation) |
|
static ResourceInformation |
newInstance(java.lang.String name,
java.lang.String units,
long value,
ResourceTypes type,
long minimumAllocation,
long maximumAllocation,
java.util.Set<java.lang.String> tags,
java.util.Map<java.lang.String,java.lang.String> attributes) |
|
static ResourceInformation |
newInstance(java.lang.String name,
java.lang.String units,
ResourceTypes resourceType) |
|
static ResourceInformation |
newInstance(ResourceInformation other) |
Create a new instance of ResourceInformation from another object.
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes) |
Set a map of attributes to the resource.
|
void |
setMaximumAllocation(long maximumAllocation) |
Set the maximum allocation for the resource.
|
void |
setMinimumAllocation(long minimumAllocation) |
Set the minimum allocation for the resource.
|
void |
setName(java.lang.String rName) |
Set the name for the resource.
|
void |
setResourceType(ResourceTypes type) |
Set the resource type.
|
void |
setTags(java.util.Set<java.lang.String> tags) |
Add tags to the resource.
|
void |
setUnits(java.lang.String rUnits) |
Set the units for the resource.
|
void |
setUnitsWithoutValidation(java.lang.String rUnits) |
Checking if a unit included by KNOWN_UNITS is an expensive operation.
|
void |
setValue(long rValue) |
Set the value for the resource.
|
java.lang.String |
toString() |
public static final java.lang.String MEMORY_URI
public static final java.lang.String VCORES_URI
public static final java.lang.String DISKS_URI
public static final java.lang.String GPU_URI
public static final java.lang.String FPGA_URI
public static final ResourceInformation MEMORY_MB
public static final ResourceInformation VCORES
public static final ResourceInformation GPUS
public static final ResourceInformation FPGAS
public static final java.util.Map<java.lang.String,ResourceInformation> SPECIAL_RESOURCES
public java.lang.String getName()
public void setName(java.lang.String rName)
rName - name for the resourcepublic java.lang.String getUnits()
public void setUnits(java.lang.String rUnits)
rUnits - units for the resource@Private public void setUnitsWithoutValidation(java.lang.String rUnits)
rUnits - units for the resourcepublic ResourceTypes getResourceType()
public void setResourceType(ResourceTypes type)
type - the resource typepublic long getValue()
public void setValue(long rValue)
rValue - the resource valuepublic long getMinimumAllocation()
public void setMinimumAllocation(long minimumAllocation)
minimumAllocation - the minimum allocation for the resourcepublic long getMaximumAllocation()
public void setMaximumAllocation(long maximumAllocation)
maximumAllocation - the maximum allocation for the resourcepublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
attributes - resource attributespublic java.util.Set<java.lang.String> getTags()
public void setTags(java.util.Set<java.lang.String> tags)
tags - resource tagspublic static ResourceInformation newInstance(ResourceInformation other)
other - the object from which the new object should be createdpublic static ResourceInformation newInstance(java.lang.String name, java.lang.String units, long value, ResourceTypes type, long minimumAllocation, long maximumAllocation)
public static ResourceInformation newInstance(java.lang.String name, java.lang.String units, long value, ResourceTypes type, long minimumAllocation, long maximumAllocation, java.util.Set<java.lang.String> tags, java.util.Map<java.lang.String,java.lang.String> attributes)
public static ResourceInformation newInstance(java.lang.String name, java.lang.String units, long value)
public static ResourceInformation newInstance(java.lang.String name, java.lang.String units)
public static ResourceInformation newInstance(java.lang.String name, java.lang.String units, long value, java.util.Set<java.lang.String> tags, java.util.Map<java.lang.String,java.lang.String> attributes)
public static ResourceInformation newInstance(java.lang.String name, java.lang.String units, ResourceTypes resourceType)
public static ResourceInformation newInstance(java.lang.String name, java.lang.String units, long minRes, long maxRes)
public static ResourceInformation newInstance(java.lang.String name, long value)
public static ResourceInformation newInstance(java.lang.String name)
public static void copy(ResourceInformation src, ResourceInformation dst)
src - Source ResourceInformation objectdst - Destination ResourceInformation objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getShorthandRepresentation()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(ResourceInformation other)
compareTo in interface java.lang.Comparable<ResourceInformation>Copyright © 2008–2025 Apache Software Foundation. All rights reserved.