public class GridClientStripedLock 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 |
|---|
GridClientStripedLock(int concurrencyLevel)
Creates new instance with the given concurrency level (number of locks).
|
| Modifier and Type | Method and Description |
|---|---|
int |
concurrencyLevel()
Gets concurrency level.
|
Lock |
getLock(int key)
Returns
Lock object for the given key. |
Lock |
getLock(long key)
Returns
Lock object for the given key. |
Lock |
getLock(Object o)
Returns lock for object.
|
void |
lock(int key)
Locks given key.
|
void |
lock(long key)
Locks given key.
|
void |
lock(Object o)
Locks an object.
|
void |
unlock(int key)
Unlocks given key.
|
void |
unlock(long key)
Unlocks given key.
|
void |
unlock(Object o)
Unlocks an object.
|
public GridClientStripedLock(int concurrencyLevel)
concurrencyLevel - Concurrency level.public int concurrencyLevel()
public Lock getLock(int key)
Lock object for the given key.key - Key.public Lock getLock(long key)
Lock object for the given key.key - Key.public Lock getLock(Object o)
o - Object.public void lock(int key)
key - Key.public void unlock(int key)
key - Key.public void lock(long key)
key - Key.public void unlock(long key)
key - Key.public void lock(Object o)
o - Object.public void unlock(Object o)
o - Object.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018