|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.common.id.dbid.ReservedIDBlock
public class ReservedIDBlock
Used by DBIDGenerator to reserve a block of uniqueIDs used to create ID objects.
Field Summary | |
---|---|
static long |
NO_ID_AVAILABLE
Indicates that all the id's have been used up for this block |
Constructor Summary | |
---|---|
ReservedIDBlock(java.lang.String context,
long first,
long last,
long max)
Construct a new instance with the first ID and last ID in the block. |
Method Summary | |
---|---|
java.lang.String |
getContext()
Return the context for this ID block; |
long |
getLast()
Return the last ID that will be used in the block; |
long |
getMax()
Return the maximum number allowed for this context |
long |
getNextID()
Return the next ID in the block. |
boolean |
isAtMaximum()
|
boolean |
isDepleted()
Returns boolean indicating if block is all used up. |
boolean |
isWrappable()
Returns boolean indicating if the numbers can be reused when the maximum number is reached. |
void |
setIsWrappable(boolean enableWrapping)
Call to enable this context to reuse its numbers when the maximum number is reached. |
java.lang.String |
toString()
Return String representation of this instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long NO_ID_AVAILABLE
Constructor Detail |
---|
public ReservedIDBlock(java.lang.String context, long first, long last, long max)
first
- Defines the first id in this block.last
- Defines the last id in the block.
java.lang.IllegalArgumentException
- if first > lastMethod Detail |
---|
public long getNextID()
public long getLast()
public java.lang.String getContext()
public boolean isDepleted()
public boolean isAtMaximum()
public void setIsWrappable(boolean enableWrapping)
public boolean isWrappable()
public long getMax()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |