Package org.onosproject.core
Class IdBlock
- java.lang.Object
-
- org.onosproject.core.IdBlock
-
public final class IdBlock extends java.lang.Object
A class representing an ID space.
-
-
Constructor Summary
Constructors Constructor Description IdBlock(long start, long size)
Constructs a new ID block with the specified size and initial value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getNextId()
Returns the next ID in the block.long
getSize()
Returns the block size.java.lang.String
toString()
-
-
-
Method Detail
-
getSize
public long getSize()
Returns the block size.- Returns:
- block size
-
getNextId
public long getNextId()
Returns the next ID in the block.- Returns:
- next ID
- Throws:
UnavailableIdException
- if there is no available ID in the block.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-