public class IdentifierManager
extends java.lang.Object
24.08.2009
| Constructor and Description |
|---|
IdentifierManager(long lowerbound,
long upperbound) |
| Modifier and Type | Method and Description |
|---|---|
long |
getRemainingIdentifiers() |
boolean |
release(long id) |
long |
reserve(long id) |
long |
reserveNew() |
public static final long MAX_ID
public static final long MIN_ID
public long reserve(long id)
public long reserveNew()
java.lang.IllegalStateException - if no more identifiers are available, then an Exception is raised.public boolean release(long id)
id - the identifier to release. Must be greater than or equal to
lowerbound and must be less than or equal to upperboundpublic long getRemainingIdentifiers()
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.