Package org.apache.poi.ooxml.util
Class IdentifierManager
- java.lang.Object
-
- org.apache.poi.ooxml.util.IdentifierManager
-
public class IdentifierManager extends java.lang.Object
24.08.2009
-
-
Constructor Summary
Constructors Constructor Description IdentifierManager(long lowerbound, long upperbound)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getRemainingIdentifiers()
boolean
release(long id)
long
reserve(long id)
long
reserveNew()
-
-
-
Field Detail
-
MAX_ID
public static final long MAX_ID
- See Also:
- Constant Field Values
-
MIN_ID
public static final long MIN_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
reserve
public long reserve(long id)
-
reserveNew
public long reserveNew()
- Returns:
- a new identifier.
- Throws:
java.lang.IllegalStateException
- if no more identifiers are available, then an Exception is raised.
-
release
public boolean release(long id)
- Parameters:
id
- the identifier to release. Must be greater than or equal tolowerbound
and must be less than or equal toupperbound
- Returns:
- true, if the identifier was reserved and has been successfully released, false, if the identifier was not reserved.
-
getRemainingIdentifiers
public long getRemainingIdentifiers()
-
-