public class IdentifierManager extends 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()
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 upperbound
public long getRemainingIdentifiers()
Copyright © 2020. All rights reserved.