code: void lockBucketsRead(long i1, long i2) {
  		int bucket1LockIdx = getBucketLock(i1);
  		int bucket2LockIdx = getBucketLock(i2);
  		// always lock segments in same order to avoid deadlocks
  		if (bucket1LockIdx < bucket2LockIdx) {
  			lockAry[bucket1LockIdx].readLock();
  			lockAry[bucket2LockIdx].readLock();
  		} else if (bucket1LockIdx > bucket2LockIdx) {
  			lockAry[bucket2LockIdx].readLock();
  			lockAry[bucket1LockIdx].readLock();
  		}
  		// if we get here both indexes are on same segment so only lock once!!!
  		else {
  			lockAry[bucket1LockIdx].readLock();
  		}
  	}
docs: Locks segments corresponding to bucket indexes in specific order to prevent deadlocks