public class GridStripedReadWriteLock extends Object
int- or long-keyed resources.
Map int and long values to some number of locks,
and supply convenience methods to obtain and release these locks using key values.| Constructor and Description |
|---|
GridStripedReadWriteLock(int concurrencyLevel)
Creates new instance with the given concurrency level (number of locks).
|
| Modifier and Type | Method and Description |
|---|---|
int |
concurrencyLevel()
Gets concurrency level.
|
ReadWriteLock[] |
getAllLocks()
Gets all locks.
|
ReadWriteLock |
getLock(int key)
Returns
Lock object for the given key. |
ReadWriteLock |
getLock(long key)
Returns
Lock object for the given key. |
ReadWriteLock |
getLock(Object o)
Returns lock for object.
|
String |
toString() |
public GridStripedReadWriteLock(int concurrencyLevel)
concurrencyLevel - Concurrency level.public int concurrencyLevel()
public ReadWriteLock[] getAllLocks()
public ReadWriteLock getLock(int key)
Lock object for the given key.key - Key.public ReadWriteLock getLock(long key)
Lock object for the given key.key - Key.public ReadWriteLock getLock(@Nullable Object o)
o - Object.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0 Release Date : March 31 2015