public class SequentialIdLease extends Object
| Modifier and Type | Field and Description |
|---|---|
private Set<Integer> |
sequentialIdsLease |
| Constructor and Description |
|---|
SequentialIdLease() |
| Modifier and Type | Method and Description |
|---|---|
int |
allocateSequentialId()
Finds and allocates the first available sequential id.
|
void |
releaseSequentialId(int sequentialId)
Frees the given sequential id so that it can be reused.
|
public int allocateSequentialId()
public void releaseSequentialId(int sequentialId)
sequentialId - the sequential id to release