Re: [infinispan-dev] JMX operations for recovery (ISPN-994)
On 18 Apr 2011, at 12:05, Mircea Markus wrote:
>> 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.
But it could roll over (yes, I know unlikely), and you also have the issue of encoding the node that generates the long into the long which is open to corruption if nodes join/leave and the cluster size is large.
But it's no biggie, works for now basically. Just keep in mind that in future a more robust/direct 1-to-1 mapping between XID and some JMX-friendly representation may be necessary.