Beispiel #1
0
 @Override
 public boolean lock(int owner) {
   int l = lock;
   if ((l & LockTable.LOCK) != 0) {
     throw LockTable.LOCKED_VERSION_EXCEPTION;
   }
   if (!UnsafeHolder.getUnsafe()
       .compareAndSwapInt(this, __LOCK_FIELD__, l, l | owner | LockTable.LOCK)) {
     throw LockTable.LOCKED_VERSION_EXCEPTION;
   }
   return true;
 }
 @Override
 public void put() {
   UnsafeHolder.getUnsafe().putChar(field.ref, field.address, value);
 }
 @Override
 public void put() {
   UnsafeHolder.getUnsafe().putInt(reference, field, value);
   clear();
 }