long lock = locks.get(hash);
if ((lock & RWLOCK) != 0) {
int owner = (int)((lock & IDMASK) >> IDOFFSET);
if (owner != id) {
// Already locked by other thread
ConflictType type;
if ((lock & WLOCK) != 0)
type = (write ? ConflictType.WW : ConflictType.WR);
else
type = (write ? ConflictType.RW : ConflictType.RR);
if (context.conflict(owner, type, hash, lock)) {