Package org.infinispan.util.concurrent.locks

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


   @Override
   public <T> T construct(Class<T> componentType) {
      if (configuration.isEnableDeadlockDetection()) {
         return (T) new DeadlockDetectingLockManager();
      } else {
         return (T) new LockManagerImpl();
      }
   }
View Full Code Here


* @since 4.0
*/
@DefaultFactoryFor(classes = LockManager.class)
public class LockManagerFactory extends AbstractComponentFactory implements AutoInstantiableFactory {
   public <T> T construct(Class<T> componentType) {
      return (T) new LockManagerImpl();
   }
View Full Code Here

            context.getFailureDescription().set(String.format("Unknown metric %s", attrName));
        } else if (cache == null) {
            context.getFailureDescription().set(String.format("Unavailable cache %s", attrName));
        } else {
            AdvancedCache<?, ?> aCache = cache.getAdvancedCache();
            LockManagerImpl lockManager = (LockManagerImpl) SecurityActions.getLockManager(aCache);
            RpcManagerImpl rpcManager = (RpcManagerImpl) SecurityActions.getRpcManager(aCache);
            List<CommandInterceptor> interceptors = SecurityActions.getInterceptorChain(aCache);
            ComponentRegistry registry = SecurityActions.getComponentRegistry(aCache);
            ComponentStatus status = SecurityActions.getCacheStatus(aCache);
            switch (metric) {
                case CACHE_STATUS:
                    result.set(status.toString());
                    break;
                case CONCURRENCY_LEVEL:
                    result.set(lockManager.getConcurrencyLevel());
                    break;
                case NUMBER_OF_LOCKS_AVAILABLE:
                    result.set(lockManager.getNumberOfLocksAvailable());
                    break;
                case NUMBER_OF_LOCKS_HELD:
                    result.set(lockManager.getNumberOfLocksHeld());
                    break;
                case AVERAGE_READ_TIME: {
                    CacheMgmtInterceptor cacheMgmtInterceptor = getFirstInterceptorWhichExtends(interceptors, CacheMgmtInterceptor.class);
                    result.set(cacheMgmtInterceptor != null ? cacheMgmtInterceptor.getAverageReadTime() : 0);
                    break;
View Full Code Here

   @Override
   public <T> T construct(Class<T> componentType) {
      if (configuration.deadlockDetection().enabled()) {
         return (T) new DeadlockDetectingLockManager();
      } else {
         return (T) new LockManagerImpl();
      }
   }
View Full Code Here

public class LockManagerFactory extends AbstractNamedCacheComponentFactory implements AutoInstantiableFactory {
   public <T> T construct(Class<T> componentType) {
      if (configuration.isEnableDeadlockDetection()) {
         return (T) new DeadlockDetectingLockManager();
      } else {
         return (T) new LockManagerImpl();
      }
   }
View Full Code Here

public class LockManagerFactory extends AbstractNamedCacheComponentFactory implements AutoInstantiableFactory {
   public <T> T construct(Class<T> componentType) {
      if (configuration.isEnableDeadlockDetection()) {
         return (T) new DeadlockDetectingLockManager();
      } else {
         return (T) new LockManagerImpl();
      }
   }
View Full Code Here

   @Override
   public <T> T construct(Class<T> componentType) {
      if (configuration.deadlockDetection().enabled()) {
         return (T) new DeadlockDetectingLockManager();
      } else {
         return (T) new LockManagerImpl();
      }
   }
View Full Code Here

public class LockManagerFactory extends AbstractNamedCacheComponentFactory implements AutoInstantiableFactory {
   public <T> T construct(Class<T> componentType) {
      if (configuration.isEnableDeadlockDetection()) {
         return (T) new DeadlockDetectingLockManager();
      } else {
         return (T) new LockManagerImpl();
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.util.concurrent.locks.LockManagerImpl

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.