List of usage examples for java.util.concurrent.locks ReentrantLock getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:io.tilt.minka.business.impl.SemaphoreImpl.java
public SemaphoreImpl(final Config config, final SpectatorSupplier supplier, final ShardID shardId) { this.config = config; this.rules = new HashMap<>(); getLockingRules().forEach(rule -> this.rules.put(rule.getAction(), rule)); this.supplier = supplier; locksByAction = new HashMap<>(); final CycleDetectingLockFactory lockFactory = CycleDetectingLockFactory.newInstance(Policies.DISABLED); for (Action key : Action.values()) { ReentrantLock lock = lockFactory.newReentrantLock(key.toString()); logger.debug("{}: ({}) Creating lock: {} for Action: {}", getClass().getSimpleName(), shardId, lock.getClass().getSimpleName(), key); locksByAction.put(key, lock);/*www .j a va 2s .com*/ //locksByAction.put(key, new ReentrantLock()); } }