Sho SHIMIZU | 9257b0c | 2014-08-13 15:00:10 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.util; |
| 2 | |
Sho SHIMIZU | 9257b0c | 2014-08-13 15:00:10 -0700 | [diff] [blame] | 3 | /** |
| 4 | * An interface that gives unique ID spaces. |
| 5 | */ |
| 6 | public interface IdBlockAllocator { |
| 7 | /** |
| 8 | * Allocates a unique Id Block. |
| 9 | * |
| 10 | * @return Id Block. |
| 11 | */ |
| 12 | IdBlock allocateUniqueIdBlock(); |
| 13 | |
| 14 | /** |
| 15 | * Allocates next unique id and retrieve a new range of ids if needed. |
| 16 | * |
| 17 | * @param range range to use for the identifier |
| 18 | * @return Id Block. |
| 19 | */ |
| 20 | IdBlock allocateUniqueIdBlock(long range); |
| 21 | } |