JBoss Community

Re: Remote Txn Inflow: Synchronizations

created by David Lloyd in JBoss Transactions Development - View the full discussion

This is gonna bug me until I fix it...

David Lloyd wrote:

[...]

You could however use integer packing to make more room; in such a scheme, the bqual bits which identify the node would still be an integer sequence but would work like this:

 

  • Values 0000-0111 (0-7): resources 0-7, length is 4 bits
  • Values 1000 0000-1011 1111 (0x80-0xBF): resources 8-71, length is 8 bits
  • Values 1100 0000 0000-1101 1111 1111 (0xC00-0xDFF): resources 72-583, length is 12 bits
  • etc.

For this to work you'd have to treat 0000 as a special padding sequence for the case where only one nybble of the last byte is used.  Thus giving:

  • 0000: padding
  • 0001-0111: resources 0-6
  • 1000 0000-1011 1111: resources 7-70
  • 1100 0000 0000-1101 1111 1111: resources 71-582
  • etc.

Reply to this message by going to Community

Start a new discussion in JBoss Transactions Development at Community