public class ContainerAllocateData
extends java.lang.Object
ResourceRequest
s.Constructor and Description |
---|
ContainerAllocateData()
Instantiates a new container allocate data.
|
Modifier and Type | Method and Description |
---|---|
void |
addAny(int count)
Adds request for any container for given count.
|
void |
addHosts(java.lang.String name,
int count)
Adds request for a host for given count.
|
void |
addRacks(java.lang.String name,
int count)
Adds request for a rack for given count.
|
ContainerAllocateData |
byAny() |
ContainerAllocateData |
byHosts() |
ContainerAllocateData |
byRacks() |
int |
getAny()
Gets the count for any container.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getHosts()
Gets the hosts counts.
|
java.lang.String |
getId() |
java.util.Map<java.lang.String,java.lang.Integer> |
getRacks()
Gets the racks counts.
|
boolean |
hasData() |
void |
setId(java.lang.String id) |
java.lang.String |
toString() |
public ContainerAllocateData()
public void addRacks(java.lang.String name, int count)
name
- the rack namecount
- the container countpublic java.util.Map<java.lang.String,java.lang.Integer> getRacks()
public void addHosts(java.lang.String name, int count)
name
- the host namecount
- the container countpublic java.util.Map<java.lang.String,java.lang.Integer> getHosts()
public void addAny(int count)
count
- the countpublic int getAny()
public void setId(java.lang.String id)
public java.lang.String getId()
public boolean hasData()
public ContainerAllocateData byAny()
public ContainerAllocateData byHosts()
public ContainerAllocateData byRacks()
public java.lang.String toString()
toString
in class java.lang.Object