blob: 38ac5ed1b1100de60d84036d01ecf65c7ae7916c [file] [log] [blame]
Brian O'Connorabafb502014-12-02 22:26:20 -08001package org.onosproject.core.impl;
Brian O'Connor520c0522014-11-23 23:50:47 -08002
Brian O'Connorabafb502014-12-02 22:26:20 -08003import org.onosproject.core.IdBlock;
Brian O'Connor520c0522014-11-23 23:50:47 -08004
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}