Package org.deuce.transaction.tl2.field

Examples of org.deuce.transaction.tl2.field.ShortWriteFieldAccess


    nextAvaliable = 0;
  }

  private void fillArray( int offset){
    for( int i=offset ; i < readSet.length ; ++i){
      readSet[i] = new ReadFieldAccess();
    }
  }
View Full Code Here


    nextAvaliable = 0;
  }

  private void fillArray( int offset){
    for( int i=offset ; i < readSet.length ; ++i){
      readSet[i] = new ReadFieldAccess();
    }
  }
View Full Code Here

    return true;
  }

  private WriteFieldAccess onReadAccess0( Object obj, long field){

    ReadFieldAccess current = readSet.getCurrent();
    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
View Full Code Here

    writeSet.put( write);
  }
 
  public void beforeReadAccess(Object obj, long field) {
   
    ReadFieldAccess next = readSet.getNext();
    next.init(obj, field);

    // Check the read is still valid
    lastReadLock = LockTable.checkLock(next.hashCode(), localClock);
  }
View Full Code Here

//      logger.log(Level.INFO, str, params);
//    }
//  }

  private WriteFieldAccess onReadAccess0(Object obj, long field) {
    ReadFieldAccess current = readSet.getCurrent();
    int hash = current.hashCode();
    // Check the read is still valid
    LockTable.checkLock(hash, localClock.get(), lastReadLock);
    // Check if it is already included in the write set
    return writeSet.contains(current);
  }
View Full Code Here

    // Add to write set
    writeSet.put(write);
  }

  public void beforeReadAccess(Object obj, long field) {
    ReadFieldAccess next = readSet.getNext();
    next.init(obj, field);
    // Check the read is still valid
    lastReadLock = LockTable.checkAndGetLock(next.hashCode(), localClock.get());
  }
View Full Code Here

    addWriteAccess0(next);
  }
 
  public void onWriteAccess(Object obj, short value, long field) {
   
    ShortWriteFieldAccess next = shortPool.getNext();
    next.set(value, obj, field);
    addWriteAccess0(next);
  }
View Full Code Here

    addWriteAccess0(next);
  }

  public void onWriteAccess(Object obj, short value, long field) {

    ShortWriteFieldAccess next = shortPool.getNext();
    next.set(value, obj, field);
    addWriteAccess0(next);
  }
View Full Code Here

    // Check the read is still valid
    lastReadLock = LockTable.checkLock(next.hashCode(), localClock);
  }
 
  public Object onReadAccess( Object obj, Object value, long field){
    WriteFieldAccess writeAccess = onReadAccess0(obj, field);
    if( writeAccess == null)
      return value;
   
    return ((ObjectWriteFieldAccess)writeAccess).getValue()
  }
View Full Code Here

   
    return ((ObjectWriteFieldAccess)writeAccess).getValue()
  }
   
  public boolean onReadAccess(Object obj, boolean value, long field) {
    WriteFieldAccess writeAccess = onReadAccess0(obj, field);
    if( writeAccess == null)
      return value;
   
    return ((BooleanWriteFieldAccess)writeAccess).getValue()
  }
View Full Code Here

TOP

Related Classes of org.deuce.transaction.tl2.field.ShortWriteFieldAccess

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.