示例#1
0
  @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);
  }
示例#2
0
  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);
  }
示例#3
0
 public WriteFieldAccess contains(ReadFieldAccess read) {
   // Check if it is already included in the write set
   return bloomFilter.contains(read.hashCode()) ? writeSet.get(read) : null;
 }