On 18 Apr 2011, at 10:57, Manik Surtani wrote:
How do you generate the Long internalID of an XID?
I'va factorised the IdGenerator(now ClusterIdGenerator) galder wrote for generating cluster-unique longs for HR's versioned operations.
Another approach may be to take the byte[] (XID) and Base64 it. Then you have a 1-to-1 mapping between the XID and a JMX-friendly String. :-) Or maybe an SHA1 hash of the byte[].
yes,that would work as well. A long is smaller and (not that matters a lot) cheaper to generate.
--
Manik Surtani
Lead, Infinispan
_______________________________________________
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev