Package com.mysql.cj.util
Class SequentialIdLease
java.lang.Object
com.mysql.cj.util.SequentialIdLease
public class SequentialIdLease
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description SequentialIdLease() -
Method Summary
Modifier and Type Method Description intallocateSequentialId()Finds and allocates the first available sequential id.voidreleaseSequentialId(int sequentialId)Frees the given sequential id so that it can be reused.
-
Constructor Details
-
SequentialIdLease
public SequentialIdLease()
-
-
Method Details
-
allocateSequentialId
public int allocateSequentialId()Finds and allocates the first available sequential id.- Returns:
- the next free sequential id.
-
releaseSequentialId
public void releaseSequentialId(int sequentialId)Frees the given sequential id so that it can be reused.- Parameters:
sequentialId- the sequential id to release
-