Package org.apache.kafka.common
Class Cell
java.lang.Object
org.apache.kafka.common.Cell
Represents the contents of a cell, a collection of brokers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbrokers()
Return the set of brokers assigned to this cellReturn the list of brokers assigned to this cellint
cellId()
The unique cell Idboolean
static int
getImplicitBrokerCellId
(int brokerId, int cellSize, int k2BaseBrokerIndex, int k2CellId, int k2DefaultCellId) Computes the implicit cell-id based on the cellSizeint
hashCode()
short
maxSize()
Return the max cell size, a cell cannot be over maxSize number of brokersshort
minSize()
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
Return the cell state (ready, quarantined, excluded)- Returns:
- cell state
-
brokers
Return the set of brokers assigned to this cell- Returns:
- cell brokers
-
brokersList
Return the list of brokers assigned to this cell- Returns:
- cell brokers
-
equals
-
hashCode
public int hashCode() -
toString
-