blob: 3c38205aaeb741fb290717696648c0eeae0d58fe [file] [log] [blame]
Sho SHIMIZU9257b0c2014-08-13 15:00:10 -07001package net.onrc.onos.core.util;
2
3import net.onrc.onos.core.registry.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}