public final class IdAllocator extends Object
Constructor and Description |
---|
IdAllocator()
Creates a new allocator with no namespace.
|
IdAllocator(String namespace)
Creates a new allocator with the provided namespace.
|
Modifier and Type | Method and Description |
---|---|
String |
allocateId(String name)
Allocates the id.
|
void |
clear()
Clears the allocator, resetting it to freshly allocated state.
|
IdAllocator |
clone()
Creates a clone of this IdAllocator instance, copying the allocator's namespace and key map.
|
List<String> |
getAllocatedIds()
Returns a list of all allocated ids, sorted alphabetically.
|
boolean |
isAllocated(String name)
Checks to see if a given name has been allocated.
|
public IdAllocator()
public IdAllocator(String namespace)
public List<String> getAllocatedIds()
public IdAllocator clone()
public String allocateId(String name)
public boolean isAllocated(String name)
public void clear()
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.