public synchronized Long generateId ( ) { if ( sequenceBlock == null || ! sequenceBlock . hasNext ( ) ) { sequenceBlock = allocateSequenceBlock ( ) ; } return sequenceBlock . next ( ) ; }
Return the next number in the sequence .