>> 3. Need to think more about this, around implications of correctness of lock
acquisition is reordered. But in terms of algorithm, sorting on identity hashcode
won't work since this will be different on different requestor JVMs.
> The algorithm does NOT sort on identity hash code, but on CH. For conflict resolution
(i.e. two keys that have same consistent hash) it can use object's hash code (default)
or allow user to specify a hash code function if needed.
Hmm. How does this work with the grouping API, where keys wrapped in a single
transaction would most likely have the same group ID, which is the basis for the hashcode
used in the consistent hash location. This would render any such ordering algorithm
useless...
That's where the callback for conflict resolution kicks in:
- if two object have the same consistent hash value
- call a user function to order the keys
- this user function, by default, would rely on object's hashcode - this only works if
the key has hashcode overridden - for the JVM reason you mentioned below