private final class DiskStore.DiskStoreStripedReadWriteLock extends java.lang.Object implements StripedReadWriteLock
Modifier and Type | Field and Description |
---|---|
private ReadWriteLockSync[] |
locks |
Modifier | Constructor and Description |
---|---|
private |
DiskStoreStripedReadWriteLock() |
Modifier and Type | Method and Description |
---|---|
java.util.List<ReadWriteLockSync> |
getAllSyncs()
Returns all Syncs
|
java.util.concurrent.locks.ReadWriteLock |
getLockForKey(java.lang.Object key)
Returns a ReadWriteLock for a particular key
|
ReadWriteLockSync |
getSyncForKey(java.lang.Object key)
Gets the Sync Stripe to use for a given key.
|
private int |
indexFor(java.lang.Object key) |
private final ReadWriteLockSync[] locks
public java.util.concurrent.locks.ReadWriteLock getLockForKey(java.lang.Object key)
getLockForKey
in interface StripedReadWriteLock
key
- the keypublic java.util.List<ReadWriteLockSync> getAllSyncs()
getAllSyncs
in interface StripedReadWriteLock
public ReadWriteLockSync getSyncForKey(java.lang.Object key)
getSyncForKey
in interface CacheLockProvider
key
- the keyprivate int indexFor(java.lang.Object key)