Class Cell
java.lang.Object
org.apache.kafka.common.Cell
Represents the contents of a cell, a collection of brokers.
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbrokers()Return the set of brokers assigned to this cellReturn the list of brokers assigned to this cellintcellId()The unique cell Idbooleanstatic intgetImplicitBrokerCellId(int brokerId, int cellSize, int k2BaseBrokerIndex, int k2CellId, int k2DefaultCellId) Computes the implicit cell-id based on the cellSizeinthashCode()shortmaxSize()Return the max cell size, a cell cannot be over maxSize number of brokersshortminSize()Return the min cell size, there must be at least minSize brokers before a cell is considered usablestate()Return the cell state (ready, quarantined, excluded)toString()
Constructor Details
Cell
Represents the contents of a cell.- Parameters:
cellId- the cell idbrokers- the brokers assigned to this cellstate- the cell state (ready, quarantined, excluded)minSize- the min cell size, there must be at least minSize brokers before a cell is considered usablemaxSize- the max cell size, a cell cannot be over maxSize number of brokers
Method Details
getImplicitBrokerCellId
public static int getImplicitBrokerCellId(int brokerId, int cellSize, int k2BaseBrokerIndex, int k2CellId, int k2DefaultCellId) Computes the implicit cell-id based on the cellSize- Parameters:
brokerId-cellSize-- Returns:
- return the implicit cell-id for the given broker
cellId
public int cellId()The unique cell Id- Returns:
- cell ID
minSize
public short minSize()Return the min cell size, there must be at least minSize brokers before a cell is considered usable- Returns:
- min cell size
maxSize
public short maxSize()Return the max cell size, a cell cannot be over maxSize number of brokers- Returns:
- max cell size
state
brokers
brokersList
equals
hashCode
toString