public class GridKeyLock extends Object
Map resources values to some number of locks, and supply convenience methods to obtain and release these locks using key values.
public <T> Object lockInterruptibly(T key) throws InterruptedException
key - Key to lock.unlock(Object, Object) method.InterruptedException - If interrupted while acquiring lock.public <T> Object lock(T key)
key - Key to lock.unlock(Object, Object) method.@Nullable public <T> Object tryLock(T key)
key - Key to lock.unlock(Object, Object) method or
null if try lock failed.public <T> void unlock(T key,
Object sync)
key - Key.sync - Sync that got from lockInterruptibly(Object) call.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.2.0 Release Date : September 15 2017