Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Advanced-java] Fast Persistence of Unique Numbers
- From: jeff.singer@xxxxxxxxxx (Jeff Singer)
- Subject: [Advanced-java] Fast Persistence of Unique Numbers
- Date: Mon, 21 Jan 2002 14:42:31 +0200
Hi All Thanks for all the replies. >Can you just use an existing UUID or GUID utility instead of re-invenint >the wheel? Sorry, I wasn't clearer on my requirements. But we are limited to 9 digit numeric numbers. As I understand it UUID and GUID are alpha-numeric. >Depending on why you want to persist the number, you may be able to avoid it. For instance Date.getTime >gives you a number that is unique, untill you call it faster than the clock granularity. With this I was limited by the fact that the number had to be unique for longer than a day. So there is a slight chance that the numbers could overlap? Also the Date.getTime returns a long, which breaks our 9 digit requirement. I am taking the approach that for a 9 digit numeric I need persistence, and will use the method described by John Wilson. It also has the advance, as mentioned, of being atomic. Thanks Again Jeff Singer > -----Original Message----- > From: advanced-java-admin@xxxxxxxxxxxxxxxxxxxxxx > [mailto:advanced-java-admin@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of > tpanton@xxxxxxxxxxxxx > Sent: 21 January 2002 01:37 > To: advanced-java@xxxxxxxxxxxxxxxx > Subject: RE:[Advanced-java] Fast Persistence of Unique Numbers > > > Depending on why you want to persist the number, you may be able > to avoid it. For instance Date.getTime gives you a number that is > unique, untill you call it faster than the clock granularity. > (If I recall on solaris you never get the same number twice). > URL: http://www.westpoint.ltd.uk/ - internet recon. > > _______________________________________________ > Advanced-java mailing list > Advanced-java@xxxxxxxxxxxxxxxxxxxxxx > http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java
- References:
- [Advanced-java] Fast Persistence of Unique Numbers
- From: tpanton@xxxxxxxxxxxxx
- [Advanced-java] Fast Persistence of Unique Numbers
- Prev by Date: [Advanced-java] Fast Persistence of Unique Numbers
- Next by Date: [Advanced-java] International
- Previous by thread: [Advanced-java] Fast Persistence of Unique Numbers
- Next by thread: [Advanced-java] MemoryImageSource question
- Index(es):