org.entityfs.lock.impl
Class SimpleLockAcquiringStrategy
java.lang.Object
org.entityfs.lock.impl.AbstractLockAcquiringStrategy
org.entityfs.lock.impl.SimpleLockAcquiringStrategy
- All Implemented Interfaces:
- LockAcquiringStrategy
public final class SimpleLockAcquiringStrategy
- extends AbstractLockAcquiringStrategy
- implements LockAcquiringStrategy
This is a simple LockAcquiringStrategy
that can wait forever on
locks.
In the case of deadlocks, the deadlocked threads will freeze forever. jstack
is a good tool for analyzing deadlocks.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- In_jar:
- entityfs-core
Method Summary |
protected boolean |
lockIt(Lock l)
Subclasses implement this to lock the given lock. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final SimpleLockAcquiringStrategy INSTANCE
SimpleLockAcquiringStrategy
public SimpleLockAcquiringStrategy()
lockIt
protected boolean lockIt(Lock l)
- Description copied from class:
AbstractLockAcquiringStrategy
- Subclasses implement this to lock the given lock.
- Specified by:
lockIt
in class AbstractLockAcquiringStrategy
- Parameters:
l
- The lock.
- Returns:
true
if successful, false
otherwise. When false
is returned, it is interpreted as due to a timeout.