Class KeyedLockMap<K>
java.lang.Object
com.cryptomorin.xseries.profiles.lock.KeyedLockMap<K>
- Type Parameters:
K- the type of object used to identify what the locks are associated to.
A registry that queues locks per-object using
KeyedLock.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
KeyedLockMap
public KeyedLockMap()
-
-
Method Details
-
lock
Doesn't actually lock the object,KeyedLock.lock()should be used immediatelly as the first statement after this method. The main reason why this isn't done in this method is because try-with-resources for a reference without delcaring a variable is not supported in Java 8, so we'd have to suppress the unused variable warning every time we use this method. -
unlock
-
toString
-