@Override public void beforeReadAccess(Object obj, long field, int advice) { ReadFieldAccess next = readSet.getNext(); currentReadFieldAccess = next; next.init(obj, field, advice); // Check the read is still valid lastReadLock = LockTable.checkLock(next.hashCode(), localClock); }
private WriteFieldAccess onReadAccess0(Object obj, long field, int advice) { ReadFieldAccess current = currentReadFieldAccess; int hash = current.hashCode(); // Check the read is still valid LockTable.checkLock(hash, localClock, lastReadLock); // Check if it is already included in the write set return writeSet.contains(current); }
public WriteFieldAccess contains(ReadFieldAccess read) { // Check if it is already included in the write set return bloomFilter.contains(read.hashCode()) ? writeSet.get(read) : null; }