Package org.jboss.cache.util.concurrent.locks

Examples of org.jboss.cache.util.concurrent.locks.LockContainer


   }

   public void testFqnHashing()
   {
      AbstractLockManagerRecordingTestTL tl = threadLocal.get();     
      LockContainer lc = (LockContainer) TestingUtil.extractField(tl.lm, "lockContainer");
      List<Fqn> fqns = new ArrayList<Fqn>();
      fqns.add(Fqn.ROOT);
      fqns.add(Fqn.fromString("/1"));
      fqns.add(Fqn.fromString("/1/2"));
      fqns.add(Fqn.fromString("/1/2/3"));
      fqns.add(Fqn.fromString("/a/b/c/d"));

      for (Fqn f : fqns) System.out.println("Fqn: " + f + "; hash = " + lc.hashToIndex(f));
   }
View Full Code Here


      assert !icc.get().getLocks().contains(fqn) : fqn + " lock recorded!";
   }

   public static void assertNoLocks(LockManager lockManager, InvocationContextContainer icc)
   {
      LockContainer lc = (LockContainer) TestingUtil.extractField(lockManager, "lockContainer");
      assert lc.getNumLocksHeld() == 0 : "Stale locks exist! NumLocksHeld is " + lc.getNumLocksHeld() + " and lock info is " + lockManager.printLockInfo();
      assert icc.get().getLocks().isEmpty() : "Stale (?) locks recorded! " + icc.get().getLocks();
   }
View Full Code Here

   }

   public void testFqnHashing()
   {
      AbstractLockManagerRecordingTestTL tl = threadLocal.get();     
      LockContainer lc = (LockContainer) TestingUtil.extractField(tl.lm, "lockContainer");
      List<Fqn> fqns = new ArrayList<Fqn>();
      fqns.add(Fqn.ROOT);
      fqns.add(Fqn.fromString("/1"));
      fqns.add(Fqn.fromString("/1/2"));
      fqns.add(Fqn.fromString("/1/2/3"));
View Full Code Here

TOP

Related Classes of org.jboss.cache.util.concurrent.locks.LockContainer

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.