Package org.jboss.cache.lock

Examples of org.jboss.cache.lock.ReadWriteLockWithUpgrade.writeLock()


   public void testTimedWriteLocks() throws InterruptedException {
      ReadWriteLockWithUpgrade l = new ReadWriteLockWithUpgrade();
      final int NUM=1000000;

      for(int i=0; i < NUM; i++) {
         l.writeLock().attempt(2000);
         l.writeLock().release();
         if(i % 10000 == 0)
            System.out.println(i);
      }
   }
View Full Code Here


      ReadWriteLockWithUpgrade l = new ReadWriteLockWithUpgrade();
      final int NUM=1000000;

      for(int i=0; i < NUM; i++) {
         l.writeLock().attempt(2000);
         l.writeLock().release();
         if(i % 10000 == 0)
            System.out.println(i);
      }
   }
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.