public static int createSerialNumber(){
  for (; ; ) {
    int result=serialNumberSequencer.incrementAndGet();
    if (result != ILLEGAL_SERIAL) {
      return result;
    }
  }
}

public static int createSerialNumber ( ) { for ( ; ; ) { int result = serialNumberSequencer . incrementAndGet ( ) ; if ( result != ILLEGAL_SERIAL ) { return result ; } } }
generates a serial number for identifying a logical resource . later instances of the same logical resource will have a greater serial number than earlier instances . this number increments statically throughout the life of this jvm . rollover to negative is allowed .
