@Module public abstract class AbstractLock extends java.lang.Object implements java.util.concurrent.locks.Lock
Constructor and Description |
---|
AbstractLock() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Returns the name of the lock.
|
void |
init()
Initialize the lock.
|
void |
lock() |
void |
lockInterruptibly() |
java.util.concurrent.locks.Condition |
newCondition() |
void |
setGuid(java.lang.String guid) |
void |
setName(java.lang.String name)
Assigns the name of the lock.
|
java.lang.String |
toString() |
boolean |
tryLock() |
boolean |
tryLock(long time,
java.util.concurrent.TimeUnit unit) |
void |
unlock() |
public java.lang.String getName()
@Configurable public void setName(java.lang.String name)
public void setGuid(java.lang.String guid)
public void lock()
lock
in interface java.util.concurrent.locks.Lock
public void lockInterruptibly() throws java.lang.InterruptedException
lockInterruptibly
in interface java.util.concurrent.locks.Lock
java.lang.InterruptedException
public boolean tryLock()
tryLock
in interface java.util.concurrent.locks.Lock
public boolean tryLock(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
tryLock
in interface java.util.concurrent.locks.Lock
java.lang.InterruptedException
public void unlock()
unlock
in interface java.util.concurrent.locks.Lock
public java.util.concurrent.locks.Condition newCondition()
newCondition
in interface java.util.concurrent.locks.Lock
@PostConstruct public void init()
public java.lang.String toString()
toString
in class java.lang.Object