public class ResourceProfile extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static ResourceProfile |
UNKNOWN |
Constructor and Description |
---|
ResourceProfile(double cpuCores,
long memoryInMB)
Creates a new ResourceProfile.
|
ResourceProfile(ResourceProfile other)
Creates a copy of the given ResourceProfile.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
double |
getCpuCores()
Get the cpu cores needed
|
long |
getMemoryInMB()
Get the memory needed in MB
|
int |
hashCode() |
boolean |
isMatching(ResourceProfile required)
Check whether required resource profile can be matched
|
String |
toString() |
public static final ResourceProfile UNKNOWN
public ResourceProfile(double cpuCores, long memoryInMB)
cpuCores
- The number of CPU cores (possibly fractional, i.e., 0.2 cores)memoryInMB
- The size of the memory, in megabytes.public ResourceProfile(ResourceProfile other)
other
- The ResourceProfile to copy.public double getCpuCores()
public long getMemoryInMB()
public boolean isMatching(ResourceProfile required)
required
- the required resource profileCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.