public class ProducerIdsBlock extends Object
Modifier and Type | Field and Description |
---|---|
static ProducerIdsBlock |
EMPTY |
static int |
PRODUCER_ID_BLOCK_SIZE |
Constructor and Description |
---|
ProducerIdsBlock(int assignedBrokerId,
long firstProducerId,
int blockSize) |
Modifier and Type | Method and Description |
---|---|
int |
assignedBrokerId()
Get the ID of the broker that this block was assigned to.
|
boolean |
equals(Object o) |
long |
firstProducerId()
Get the first ID (inclusive) to be assigned from this block.
|
int |
hashCode() |
long |
lastProducerId()
Get the last ID (inclusive) to be assigned from this block.
|
long |
nextBlockFirstId()
Get the first ID of the next block following this one.
|
int |
size()
Get the number of IDs contained in this block.
|
String |
toString() |
public static final int PRODUCER_ID_BLOCK_SIZE
public static final ProducerIdsBlock EMPTY
public ProducerIdsBlock(int assignedBrokerId, long firstProducerId, int blockSize)
public int assignedBrokerId()
public long firstProducerId()
public int size()
public long lastProducerId()
public long nextBlockFirstId()