public interface VirtualMachineLease
VirtualMachineLease
interface. You can get such an object by passing the
Offer
object that represents that Mesos offer (and that you received
from Mesos) into the VMLeaseObject
constructor.Modifier and Type | Interface and Description |
---|---|
static class |
VirtualMachineLease.Range
Describes a [beginning, end] range.
|
Modifier and Type | Method and Description |
---|---|
double |
cpuCores()
Get the number of cores (CPUs) on this host that are available for assigning.
|
double |
diskMB()
Get the amount of disk space, in MB, on this host that is avaialble for assigning.
|
java.util.Map<java.lang.String,org.apache.mesos.Protos.Attribute> |
getAttributeMap()
Get the map of Mesos attributes associated with this lease (offer).
|
java.lang.String |
getId()
Get the ID of the lease (offer ID).
|
org.apache.mesos.Protos.Offer |
getOffer()
Get the Mesos resource offer associated with this lease.
|
long |
getOfferedTime()
Get the time that this lease (offer) was obtained.
|
java.lang.Double |
getScalarValue(java.lang.String name)
Get the value of the scalar resource for the given
name . |
java.util.Map<java.lang.String,java.lang.Double> |
getScalarValues()
Get a map of all of the scalar resources with resource names as the key and resource value as the value.
|
java.lang.String |
getVMID()
Get the ID of the host (mesos slave ID).
|
java.lang.String |
hostname()
Get the name of the host offered in this lease.
|
double |
memoryMB()
Get the amount of memory, in MBs, on this host that is available for assigning.
|
double |
networkMbps()
Get the amount of network bandwidth, in Mbps, on this host that is available for assigning.
|
java.util.List<VirtualMachineLease.Range> |
portRanges()
Get the list of port ranges on this host that are available for assigning.
|
java.lang.String getId()
long getOfferedTime()
java.lang.String hostname()
java.lang.String getVMID()
double cpuCores()
double memoryMB()
double networkMbps()
double diskMB()
java.util.List<VirtualMachineLease.Range> portRanges()
org.apache.mesos.Protos.Offer getOffer()
java.util.Map<java.lang.String,org.apache.mesos.Protos.Attribute> getAttributeMap()
java.lang.Double getScalarValue(java.lang.String name)
name
.name
- Name of the scalar resource.null
otherwise.java.util.Map<java.lang.String,java.lang.Double> getScalarValues()