ontopoly
Class LockManager

java.lang.Object
  extended by ontopoly.LockManager
All Implemented Interfaces:
java.io.Serializable

public class LockManager
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
static class LockManager.Lock
           
 
Field Summary
static long DEFAULT_LOCK_REACQUIRE_TIMESPAN_MINUTES
           
static long DEFAULT_LOCK_TIMESPAN_MINUTES
           
 
Constructor Summary
LockManager()
           
LockManager(long lockTimespan)
           
 
Method Summary
 void expireLocksForOwner(java.lang.String lockerId)
           
 LockManager.Lock forcedUnlock(java.lang.String lockKey)
           
 long getLockTimeSpan()
           
 LockManager.Lock lock(java.lang.String lockKey, java.lang.String lockerId)
           
 LockManager.Lock unlock(java.lang.String lockKey, java.lang.String lockerId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LOCK_TIMESPAN_MINUTES

public static final long DEFAULT_LOCK_TIMESPAN_MINUTES
See Also:
Constant Field Values

DEFAULT_LOCK_REACQUIRE_TIMESPAN_MINUTES

public static final long DEFAULT_LOCK_REACQUIRE_TIMESPAN_MINUTES
See Also:
Constant Field Values
Constructor Detail

LockManager

public LockManager()

LockManager

public LockManager(long lockTimespan)
Method Detail

getLockTimeSpan

public long getLockTimeSpan()

lock

public LockManager.Lock lock(java.lang.String lockKey,
                             java.lang.String lockerId)

forcedUnlock

public LockManager.Lock forcedUnlock(java.lang.String lockKey)

unlock

public LockManager.Lock unlock(java.lang.String lockKey,
                               java.lang.String lockerId)

expireLocksForOwner

public void expireLocksForOwner(java.lang.String lockerId)


Copyright © 2000-2012 Ontopia.