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
Modifier and TypeMethodDescriptionThis method will return a finalized lock if the fetcher already has the value, which prevents the unnecessary synchronization and creation of locks, otherwise the associated key will be locked and the value can be retrieved again withKeyedLock.getOrRetryValue()after the lock was released by other threads.toString()
-
Constructor Details
-
KeyedLockMap
public KeyedLockMap()
-
-
Method Details
-
lock
- See Also:
-
lock
This method will return a finalized lock if the fetcher already has the value, which prevents the unnecessary synchronization and creation of locks, otherwise the associated key will be locked and the value can be retrieved again withKeyedLock.getOrRetryValue()after the lock was released by other threads. -
toString
-