Examples of ownsLock()


Examples of org.infinispan.transaction.impl.LocalTransaction.ownsLock()

      tm.begin();
      advancedCache.withFlags(Flag.FORCE_WRITE_LOCK).get("k");

      TransactionTable txTable = advancedCache.getComponentRegistry().getComponent(TransactionTable.class);
      LocalTransaction tx = txTable.getLocalTransaction(tm.getTransaction());
      assertTrue(tx.ownsLock("k"));
      assertLocked(advancedCache,"k");

      tm.commit();
      assertNotLocked(advancedCache,"k");
   }
View Full Code Here

Examples of org.jboss.cache.lock.LockManager.ownsLock()

      NodeSPI<String, String> n = cache.peek(fqn, true);
      if (owner == null) owner = Thread.currentThread();
      assertTrue("node " + fqn + " is not locked", lm.isLocked(n));
      if (write_locked)
      {
         assertTrue("node " + fqn + " is not write-locked by owner " + owner, lm.ownsLock(fqn, LockType.WRITE, owner));
      }
      else
      {
         assertTrue("node " + fqn + " is not read-locked by owner " + owner, lm.ownsLock(fqn, LockType.READ, owner));
      }
View Full Code Here

Examples of org.jboss.cache.lock.LockManager.ownsLock()

      {
         assertTrue("node " + fqn + " is not write-locked by owner " + owner, lm.ownsLock(fqn, LockType.WRITE, owner));
      }
      else
      {
         assertTrue("node " + fqn + " is not read-locked by owner " + owner, lm.ownsLock(fqn, LockType.READ, owner));
      }
   }
}
View Full Code Here

Examples of org.jboss.cache.lock.LockManager.ownsLock()

      NodeSPI<String, String> n = cache.peek(fqn, true);
      if (owner == null) owner = Thread.currentThread();
      assertTrue("node " + fqn + " is not locked", lm.isLocked(n));
      if (write_locked)
      {
         assertTrue("node " + fqn + " is not write-locked by owner " + owner, lm.ownsLock(fqn, LockType.WRITE, owner));
      }
      else
      {
         assertTrue("node " + fqn + " is not read-locked by owner " + owner, lm.ownsLock(fqn, LockType.READ, owner));
      }
View Full Code Here

Examples of org.jboss.cache.lock.LockManager.ownsLock()

      {
         assertTrue("node " + fqn + " is not write-locked by owner " + owner, lm.ownsLock(fqn, LockType.WRITE, owner));
      }
      else
      {
         assertTrue("node " + fqn + " is not read-locked by owner " + owner, lm.ownsLock(fqn, LockType.READ, owner));
      }
   }
}
View Full Code Here

Examples of org.jboss.cache.lock.LockManager.ownsLock()

      {
         LockManager lm = TestingUtil.extractLockManager(cache);
         NodeSPI<String, String> n = cache.peek(fqn, true);
         if (owner == null) owner = Thread.currentThread();
         assertTrue("node " + fqn + " is not locked", lm.isLocked(n));
         assertTrue("node " + fqn + " is not write-locked by owner " + owner, lm.ownsLock(fqn, LockType.WRITE, owner));
      }
   }
}
View Full Code Here

Examples of org.jboss.cache.lock.LockManager.ownsLock()

      {
         LockManager lm = TestingUtil.extractLockManager(cache);
         NodeSPI<String, String> n = cache.peek(fqn, true);
         if (owner == null) owner = Thread.currentThread();
         assertTrue("node " + fqn + " is not locked", lm.isLocked(n));
         assertTrue("node " + fqn + " is not write-locked by owner " + owner, lm.ownsLock(fqn, LockType.WRITE, owner));
      }
   }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.