commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Reilly" <tim.rei...@consultant.com>
Subject RE: [id] Re: Commons-Id component ?
Date Sun, 02 May 2004 04:16:25 GMT
>
> I think that this would be an improvement, unless I am missing something.
>    Tim, can you see anything wrong with this?
>
> Phil

I don't see any problems with this. I'll commit a new version of the
VersionFourGenerator. I'd missed applying a change I'd done earlier that
allows the PRNG class and package strings to be set & allows an option for
secure or normal random number generator to be used. Additionally, I'll
remove the singleton pattern from VersionFourGenerator.

> > instance. In case of VersionFourGenerator you store the Random instance
> > in a static member anyway, you may also initialize it within a static
> > initializer instead within the ctor.

Yes, singleton no longer makes sense here.

> > Same case applies to
> > VersionOneGenerator, make the manager static, initialize it in the ctor
> > if you don't have an instance yet and synchronize on the manager in
> > nextUUID.

Yes, sounds good.

==
One additional item to keep in mind, we've discussed changing the UUID
implementation to match jdk 1.5 java.util.UUID.
I'll try to get this done soon, but just a heads-up about the changes
coming.
The api doc: http://java.sun.com/j2se/1.5.0/docs/api/java/util/UUID.html


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message