Brian O'Connor | 520c052 | 2014-11-23 23:50:47 -0800 | [diff] [blame] | 1 | package org.onlab.onos.core.impl; |
| 2 | |
| 3 | import org.onlab.onos.core.IdBlock; |
| 4 | |
| 5 | /** |
| 6 | * An interface that gives unique ID spaces. |
| 7 | */ |
| 8 | public interface IdBlockAllocator { |
| 9 | /** |
| 10 | * Allocates a unique Id Block. |
| 11 | * |
| 12 | * @return Id Block. |
| 13 | */ |
| 14 | IdBlock allocateUniqueIdBlock(); |
| 15 | |
| 16 | /** |
| 17 | * Allocates next unique id and retrieve a new range of ids if needed. |
| 18 | * |
| 19 | * @param range range to use for the identifier |
| 20 | * @return Id Block. |
| 21 | */ |
| 22 | IdBlock allocateUniqueIdBlock(long range); |
| 23 | } |