|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.util.concurrent.LockManagers
ManagedLocks instead
@Deprecated public class LockManagers
| Constructor Summary | |
|---|---|
LockManagers()
Deprecated. |
|
| Method Summary | ||
|---|---|---|
static
|
weakLockManager()
Deprecated. use ManagedLocks.weakManagedLockFactory() instead. |
|
static
|
weakLockManager(Function<T,D> stripeFunction)
Deprecated. use ManagedLocks.weakManagedLockFactory(Function)
instead. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LockManagers()
| Method Detail |
|---|
@Deprecated public static <T> LockManager<T> weakLockManager()
ManagedLocks.weakManagedLockFactory() instead.
weakLockManager(Function)
with the identity function. So all inputs map directly to an individual
lock.
T - the type of the thing used to look up locks@Deprecated public static <T,D> LockManager<T> weakLockManager(Function<T,D> stripeFunction)
ManagedLocks.weakManagedLockFactory(Function)
instead.
LockManager that is used to perform operations under a
particular lock. The specific lock chosen is decided by the supplied
striping function. The particular Lock is resolved using a
Function that resolves to a descriptor used to look up a Lock
instance. This allows for a finite set of locks to be used even if the set
of T is essentially unbounded.
For instance:
LockManager<Identifiable, Integer> manager = LockManagers.weakLockManager(new Function<Identifiable, Integer>() {
Integer get(Identifiable thing) {
return thing.getId() % 16;
}
};
uses only 16 possible locks as the function returns the modulo 16 of the
thing's id.
T - the type of the thing used to look up locksD - the type used to map lock instancesstripeFunction - to convert Ts to Ds.
LockManager instance that stores created Lock
instances with weak references.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||