@InterfaceAudience.Private public class IdReadWriteLockWithObjectPool<T> extends IdReadWriteLock<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
IdReadWriteLockWithObjectPool.ReferenceType |
| Constructor and Description |
|---|
IdReadWriteLockWithObjectPool() |
IdReadWriteLockWithObjectPool(IdReadWriteLockWithObjectPool.ReferenceType referenceType)
Constructor of IdReadWriteLockWithObjectPool
|
| Modifier and Type | Method and Description |
|---|---|
ReentrantReadWriteLock |
getLock(T id)
Get the ReentrantReadWriteLock corresponding to the given id
|
IdReadWriteLockWithObjectPool.ReferenceType |
getReferenceType() |
waitForWaiterspublic IdReadWriteLockWithObjectPool()
public IdReadWriteLockWithObjectPool(IdReadWriteLockWithObjectPool.ReferenceType referenceType)
referenceType - type of the reference used in lock pool, IdReadWriteLockWithObjectPool.ReferenceType.WEAK by
default. Use IdReadWriteLockWithObjectPool.ReferenceType.SOFT if the key set is limited and the
locks will be reused with a high frequencypublic ReentrantReadWriteLock getLock(T id)
getLock in class IdReadWriteLock<T>id - an arbitrary number to identify the lockpublic IdReadWriteLockWithObjectPool.ReferenceType getReferenceType()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.