Examples of OwnableReentrantLock


Examples of org.infinispan.util.concurrent.locks.OwnableReentrantLock

   }

   @Override
   protected void initLocks(int numLocks) {
      sharedLocks = new OwnableReentrantLock[numLocks];
      for (int i = 0; i < numLocks; i++) sharedLocks[i] = new OwnableReentrantLock();
   }
View Full Code Here

Examples of org.infinispan.util.concurrent.locks.OwnableReentrantLock

      return sharedLocks[hashToIndex(object)];
   }

   @Override
   public final boolean ownsLock(Object object, Object owner) {
      OwnableReentrantLock lock = getLock(object);
      return owner.equals(lock.getOwner());
   }
View Full Code Here

Examples of org.infinispan.util.concurrent.locks.OwnableReentrantLock

      return owner.equals(lock.getOwner());
   }

   @Override
   public final boolean isLocked(Object object) {
      OwnableReentrantLock lock = getLock(object);
      return lock.isLocked();
   }
View Full Code Here

Examples of org.infinispan.util.concurrent.locks.OwnableReentrantLock

      return new OwnableRefCountingReentrantLock();
   }

   @Override
   public boolean ownsLock(Object key, Object owner) {
      OwnableReentrantLock l = getLockFromMap(key);
      return l != null && owner.equals(l.getOwner());
   }
View Full Code Here

Examples of org.infinispan.util.concurrent.locks.OwnableReentrantLock

      return l != null && owner.equals(l.getOwner());
   }

   @Override
   public boolean isLocked(Object key) {
      OwnableReentrantLock l = getLockFromMap(key);
      return l != null && l.isLocked();
   }
View Full Code Here

Examples of org.infinispan.util.concurrent.locks.OwnableReentrantLock

      initLocks(calculateNumberOfSegments(concurrencyLevel));
   }

   protected void initLocks(int numLocks) {
      sharedLocks = new OwnableReentrantLock[numLocks];
      for (int i = 0; i < numLocks; i++) sharedLocks[i] = new OwnableReentrantLock(icc);
   }
View Full Code Here

Examples of org.infinispan.util.concurrent.locks.OwnableReentrantLock

   public final OwnableReentrantLock getLock(Object object) {
      return sharedLocks[hashToIndex(object)];
   }

   public final boolean ownsLock(Object object, Object owner) {
      OwnableReentrantLock lock = getLock(object);
      return owner.equals(lock.getOwner());
   }
View Full Code Here

Examples of org.infinispan.util.concurrent.locks.OwnableReentrantLock

      OwnableReentrantLock lock = getLock(object);
      return owner.equals(lock.getOwner());
   }

   public final boolean isLocked(Object object) {
      OwnableReentrantLock lock = getLock(object);
      return lock.isLocked();
   }
View Full Code Here

Examples of org.infinispan.util.concurrent.locks.OwnableReentrantLock

      super(concurrencyLevel);
      this.icc = icc;
   }

   protected Lock newLock() {
      return new OwnableReentrantLock(icc);
   }
View Full Code Here

Examples of org.infinispan.util.concurrent.locks.OwnableReentrantLock

   protected Lock newLock() {
      return new OwnableReentrantLock(icc);
   }

   public boolean ownsLock(Object key, Object owner) {
      OwnableReentrantLock l = getLockFromMap(key);
      return l != null && owner.equals(l.getOwner());
   }
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.