blob: bc60470fb361d5cf13710d8906fb3d42fd49faf4 [file] [log] [blame]
Sho SHIMIZU9257b0c2014-08-13 15:00:10 -07001package net.onrc.onos.core.util;
2
Sho SHIMIZU9257b0c2014-08-13 15:00:10 -07003/**
4 * An interface that gives unique ID spaces.
5 */
6public 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}