public final class IdBlock extends Object
| Constructor and Description |
|---|
IdBlock(long start,
long size)
Constructs a new ID block with the specified size and initial value.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getNextId()
Returns the next ID in the block.
|
long |
getSize()
Returns the block size.
|
String |
toString() |
public IdBlock(long start,
long size)
start - initial value of the blocksize - size of the blockIllegalArgumentException - if the size is less than or equal to 0public long getSize()
public long getNextId()
UnavailableIdException - if there is no available ID in the block.