gov.lanl.Database
Class Sequence_

java.lang.Object
  |
  +--gov.lanl.Database.Sequence_
Direct Known Subclasses:
Sequence__DB

public class Sequence_
extends java.lang.Object

Simple class for obtaining a persistent counter to generate ids

 

Field Summary
 int chunkSize
           
 long sequence
           
 
Constructor Summary
Sequence_()
          Constructor declaration
Sequence_(int chunkSize)
          Constructor declaration
 
Method Summary
 long getMaxValue()
          Method declaration
 long getNextValue()
          Method declaration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sequence

public long sequence

chunkSize

public int chunkSize
Constructor Detail

Sequence_

public Sequence_()
Constructor declaration

See Also:

Sequence_

public Sequence_(int chunkSize)
Constructor declaration

Parameters:
chunkSize -
See Also:
Method Detail

getMaxValue

public long getMaxValue()
Method declaration

Returns:
current upper bound
See Also:

getNextValue

public long getNextValue()
Method declaration

Returns:
the next upper bound
See Also: