public class Cell extends Object
Modifier and Type | Method and Description |
---|---|
void |
addBroker(Broker broker) |
Collection<Broker> |
aliveBrokers() |
Broker |
broker(int brokerId)
Get the broker with the given broker id.
|
Collection<Broker> |
brokers()
Get the collection of brokers in the current cell.
|
double |
capacityFor(Resource resource)
Get cell capacity for the requested resource.
|
boolean |
equals(Object o) |
int |
hashCode() |
String |
id()
Get the cell Id.
|
boolean |
isCellAlive()
Checks if cell has at least one alive brokers.
|
Load |
load()
Get the cell load information.
|
int |
numReplicas()
Return total number of replicas in this cell.
|
long |
numTopicReplicas(String topic)
Get the number of replicas with the given topic name in this cell.
|
List<Replica> |
replicas()
Get the list of replicas in the cell.
|
Set<String> |
topics()
Get a set of topic names in the cell.
|
String |
toString() |
public void addBroker(Broker broker)
public Load load()
public String id()
public Collection<Broker> brokers()
public Collection<Broker> aliveBrokers()
public Broker broker(int brokerId)
brokerId
- Id of the queried broker.public long numTopicReplicas(String topic)
topic
- Name of the topic for which the number of replicas in this cell will be counted.public int numReplicas()
public double capacityFor(Resource resource)
resource
- Resource for which capacity will be provided.public boolean isCellAlive()