blob: 4e598623071bc907ee8cf5f78ed76c9959d4ed54 [file] [log] [blame]
Brian O'Connor520c0522014-11-23 23:50:47 -08001package org.onlab.onos.core.impl;
2
3import org.onlab.onos.core.IdBlock;
4
5/**
6 * An interface that gives unique ID spaces.
7 */
8public 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}