Code example for CycleDetectingLockFactory

Methods: newReentrantLock

0
 
	private static CycleDetectingLockFactory.Policy policy;
	public static CycleDetectingLockFactory factory;
 
	public static ReentrantLock lock(String name) {
		return factory.newReentrantLock(name);
	} 
 
	public static void warnOnLockCycles() { 
		setPolicy(CycleDetectingLockFactory.Policies.WARN);
	} 
 
	public static void throwOnLockCycles() { 
		setPolicy(CycleDetectingLockFactory.Policies.THROW);
	} 
 
	public static void ignoreLockCycles() { 
		setPolicy(CycleDetectingLockFactory.Policies.DISABLED);
	} 
 
Connect your IDE to all the code out there  Get Codota for Java