blob: 4e598623071bc907ee8cf5f78ed76c9959d4ed54 [file] [log] [blame]
package org.onlab.onos.core.impl;
import org.onlab.onos.core.IdBlock;
/**
* An interface that gives unique ID spaces.
*/
public interface IdBlockAllocator {
/**
* Allocates a unique Id Block.
*
* @return Id Block.
*/
IdBlock allocateUniqueIdBlock();
/**
* Allocates next unique id and retrieve a new range of ids if needed.
*
* @param range range to use for the identifier
* @return Id Block.
*/
IdBlock allocateUniqueIdBlock(long range);
}