public class Host extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
Broker |
broker(int brokerId) |
Collection<Broker> |
brokers() |
double |
capacityFor(Resource resource)
Get host capacity for the requested resource.
|
Map<String,Object> |
getJsonStructure() |
boolean |
isAlive() |
Load |
load()
The load on the rack.
|
String |
name()
The name of the host
|
int |
numTopicReplicas(String topic)
Get the number of replicas with the given topic name in this host.
|
Rack |
rack() |
Set<Replica> |
replicas() |
Set<String> |
topics() |
String |
toString() |
void |
writeTo(OutputStream out) |
public Rack rack()
public Broker broker(int brokerId)
public Collection<Broker> brokers()
public int numTopicReplicas(String topic)
topic
- Name of the topic for which the number of replicas in this rack will be counted.public Set<String> topics()
public double capacityFor(Resource resource)
resource
- Resource for which capacity will be provided.public boolean isAlive()
public Load load()
public String name()
public void writeTo(OutputStream out) throws IOException
IOException