Class Resource
- All Implemented Interfaces:
Serializable
,Cloneable
Describes the resources available for a container instance.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
When thedoubleValue
type is set, the value of the resource must be a double precision floating-point type.When theintegerValue
type is set, the value of the resource must be an integer.When thelongValue
type is set, the value of the resource must be an extended precision floating-point type.getName()
The name of the resource, such asCPU
,MEMORY
,PORTS
, or a user-defined resource.When thestringSetValue
type is set, the value of the resource must be a string type.getType()
The type of the resource, such asINTEGER
,DOUBLE
,LONG
, orSTRINGSET
.int
hashCode()
void
setDoubleValue
(Double doubleValue) When thedoubleValue
type is set, the value of the resource must be a double precision floating-point type.void
setIntegerValue
(Integer integerValue) When theintegerValue
type is set, the value of the resource must be an integer.void
setLongValue
(Long longValue) When thelongValue
type is set, the value of the resource must be an extended precision floating-point type.void
The name of the resource, such asCPU
,MEMORY
,PORTS
, or a user-defined resource.void
setStringSetValue
(Collection<String> stringSetValue) When thestringSetValue
type is set, the value of the resource must be a string type.void
The type of the resource, such asINTEGER
,DOUBLE
,LONG
, orSTRINGSET
.toString()
Returns a string representation of this object; useful for testing and debugging.withDoubleValue
(Double doubleValue) When thedoubleValue
type is set, the value of the resource must be a double precision floating-point type.withIntegerValue
(Integer integerValue) When theintegerValue
type is set, the value of the resource must be an integer.withLongValue
(Long longValue) When thelongValue
type is set, the value of the resource must be an extended precision floating-point type.The name of the resource, such asCPU
,MEMORY
,PORTS
, or a user-defined resource.withStringSetValue
(String... stringSetValue) When thestringSetValue
type is set, the value of the resource must be a string type.withStringSetValue
(Collection<String> stringSetValue) When thestringSetValue
type is set, the value of the resource must be a string type.The type of the resource, such asINTEGER
,DOUBLE
,LONG
, orSTRINGSET
.
-
Constructor Details
-
Resource
public Resource()
-
-
Method Details
-
setName
The name of the resource, such as
CPU
,MEMORY
,PORTS
, or a user-defined resource.- Parameters:
name
- The name of the resource, such asCPU
,MEMORY
,PORTS
, or a user-defined resource.
-
getName
The name of the resource, such as
CPU
,MEMORY
,PORTS
, or a user-defined resource.- Returns:
- The name of the resource, such as
CPU
,MEMORY
,PORTS
, or a user-defined resource.
-
withName
The name of the resource, such as
CPU
,MEMORY
,PORTS
, or a user-defined resource.- Parameters:
name
- The name of the resource, such asCPU
,MEMORY
,PORTS
, or a user-defined resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setType
The type of the resource, such as
INTEGER
,DOUBLE
,LONG
, orSTRINGSET
.- Parameters:
type
- The type of the resource, such asINTEGER
,DOUBLE
,LONG
, orSTRINGSET
.
-
getType
The type of the resource, such as
INTEGER
,DOUBLE
,LONG
, orSTRINGSET
.- Returns:
- The type of the resource, such as
INTEGER
,DOUBLE
,LONG
, orSTRINGSET
.
-
withType
The type of the resource, such as
INTEGER
,DOUBLE
,LONG
, orSTRINGSET
.- Parameters:
type
- The type of the resource, such asINTEGER
,DOUBLE
,LONG
, orSTRINGSET
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDoubleValue
When the
doubleValue
type is set, the value of the resource must be a double precision floating-point type.- Parameters:
doubleValue
- When thedoubleValue
type is set, the value of the resource must be a double precision floating-point type.
-
getDoubleValue
When the
doubleValue
type is set, the value of the resource must be a double precision floating-point type.- Returns:
- When the
doubleValue
type is set, the value of the resource must be a double precision floating-point type.
-
withDoubleValue
When the
doubleValue
type is set, the value of the resource must be a double precision floating-point type.- Parameters:
doubleValue
- When thedoubleValue
type is set, the value of the resource must be a double precision floating-point type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLongValue
When the
longValue
type is set, the value of the resource must be an extended precision floating-point type.- Parameters:
longValue
- When thelongValue
type is set, the value of the resource must be an extended precision floating-point type.
-
getLongValue
When the
longValue
type is set, the value of the resource must be an extended precision floating-point type.- Returns:
- When the
longValue
type is set, the value of the resource must be an extended precision floating-point type.
-
withLongValue
When the
longValue
type is set, the value of the resource must be an extended precision floating-point type.- Parameters:
longValue
- When thelongValue
type is set, the value of the resource must be an extended precision floating-point type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIntegerValue
When the
integerValue
type is set, the value of the resource must be an integer.- Parameters:
integerValue
- When theintegerValue
type is set, the value of the resource must be an integer.
-
getIntegerValue
When the
integerValue
type is set, the value of the resource must be an integer.- Returns:
- When the
integerValue
type is set, the value of the resource must be an integer.
-
withIntegerValue
When the
integerValue
type is set, the value of the resource must be an integer.- Parameters:
integerValue
- When theintegerValue
type is set, the value of the resource must be an integer.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getStringSetValue
When the
stringSetValue
type is set, the value of the resource must be a string type.- Returns:
- When the
stringSetValue
type is set, the value of the resource must be a string type.
-
setStringSetValue
When the
stringSetValue
type is set, the value of the resource must be a string type.- Parameters:
stringSetValue
- When thestringSetValue
type is set, the value of the resource must be a string type.
-
withStringSetValue
When the
stringSetValue
type is set, the value of the resource must be a string type.NOTE: This method appends the values to the existing list (if any). Use
setStringSetValue(java.util.Collection)
orwithStringSetValue(java.util.Collection)
if you want to override the existing values.- Parameters:
stringSetValue
- When thestringSetValue
type is set, the value of the resource must be a string type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withStringSetValue
When the
stringSetValue
type is set, the value of the resource must be a string type.- Parameters:
stringSetValue
- When thestringSetValue
type is set, the value of the resource must be a string type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-