|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.entityfs.lock.NoObjectDummyLock
public class NoObjectDummyLock
This is a dummy EntityLock implementation that is not connected to
any particular entity.
Since this object does not contain any mutable internal state, the singleton
instance INSTANCE can be used instead of instantiating the class.
| Field Summary | |
|---|---|
static NoObjectDummyLock |
INSTANCE
Singleton instance that may be used instead of instantiating the class. |
| Constructor Summary | |
|---|---|
NoObjectDummyLock()
|
|
| Method Summary | |
|---|---|
int |
getHoldCount()
Get the hold count of the lock. |
Lockable |
getLocked()
Get the locked object. |
boolean |
isDummy()
Is this lock a dummy lock. |
boolean |
isHeldByCurrentThread()
Is this lock held by the current thread? (This is implemented by ReentrantLock but not specified in the Lock interface.) |
boolean |
isReadLock()
Returns true if this lock is a read lock. |
boolean |
isWriteLock()
Returns true if this lock is a write lock. |
void |
lock()
|
void |
lockInterruptibly()
|
Condition |
newCondition()
|
boolean |
tryLock()
|
boolean |
tryLock(long timeout,
TimeUnit tu)
|
void |
unlock()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final NoObjectDummyLock INSTANCE
| Constructor Detail |
|---|
public NoObjectDummyLock()
| Method Detail |
|---|
public boolean isReadLock()
EntityLocktrue if this lock is a read lock.
isReadLock in interface EntityLocktrue, always.public boolean isWriteLock()
EntityLocktrue if this lock is a write lock.
isWriteLock in interface EntityLocktrue, always.public Lockable getLocked()
EntityLocknull.
getLocked in interface EntityLocknull, always.
public Condition newCondition()
throws UnsupportedOperationException
newCondition in interface LockUnsupportedOperationException - Always.public boolean tryLock()
tryLock in interface Locktrue, always.
public boolean tryLock(long timeout,
TimeUnit tu)
tryLock in interface Locktrue, always.public void unlock()
unlock in interface Lockpublic void lock()
lock in interface Lockpublic void lockInterruptibly()
lockInterruptibly in interface Lockpublic int getHoldCount()
EntityLockLock.lock() has been
called minus the number of times Lock.unlock() has been called by
the current thread.) If the hold count is 0, the lock is unlocked. The
hold count can never be less than 0.
getHoldCount in interface EntityLock0, always.public boolean isHeldByCurrentThread()
EntityLockReentrantLock but not specified in the Lock interface.)
isHeldByCurrentThread in interface EntityLocktrue, always.public boolean isDummy()
EntityLock
isDummy in interface EntityLocktrue, always.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||