K - The type of the key used to retrieve the lock.public class LockFactory<K> extends Object
WeakHashMap against a key. Each lock has a strong
reference to its key, so that once all consumers of a lock give up their strong references to the lock, the single
strong reference to the key from within the lock is freed. This allows the behaviour of the cache to now clear out
the cached entry.| Constructor and Description |
|---|
LockFactory()
Constructs a new LockFactory instance.
|
| Modifier and Type | Method and Description |
|---|---|
Lock |
acquireLock(K key)
Given a key, lookup/create the associated lock instance.
|
public Lock acquireLock(K key)
key - the key used to index a give lock instance.NullPointerException - if key is null.Copyright © 2010–2023 Open Identity Platform Community. All rights reserved.