[infinispan-dev] JMX operations for recovery (ISPN-994)

Manik Surtani manik at jboss.org
Mon Apr 18 07:39:36 EDT 2011


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.

--
Manik Surtani
manik at jboss.org
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org






More information about the infinispan-dev mailing list