public static String generateIncUuid ( Object caller ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "generateIncUuid" , "Caller=" + caller ) ; java . util . Date time = new java . util . Date ( ) ; int hash = caller . hashCode ( ) ; long millis = time . getTime ( ) ; byte [ ] data = new byte [ ] { ( byte ) ( hash >> 24 ) , ( byte ) ( hash >> 16 ) , ( byte ) ( hash >> 8 ) , ( byte ) ( hash ) , ( byte ) ( millis >> 24 ) , ( byte ) ( millis >> 16 ) , ( byte ) ( millis >> 8 ) , ( byte ) ( millis ) } ; String digits = "0123456789ABCDEF" ; StringBuffer retval = new StringBuffer ( data . length * 2 ) ; for ( int i = 0 ; i < data . length ; i ++ ) { retval . append ( digits . charAt ( ( data [ i ] >> 4 ) & 0xf ) ) ; retval . append ( digits . charAt ( data [ i ] & 0xf ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "generateIncUuid" , "return=" + retval ) ; return retval . toString ( ) ; }
The UUID for this incarnation of ME is generated using the hashcode of this object and the least significant four bytes of the current time in milliseconds .