org.jivesoftware.util.lock
Class LocalLockFactory
java.lang.Object
org.jivesoftware.util.lock.LocalLockFactory
- All Implemented Interfaces:
- LockFactory
public class LocalLockFactory
- extends Object
- implements LockFactory
LockFactory to be used when not running in cluster mode. The locks returned by this
factory are only visibile within this JVM.
- Author:
- Gaston Dombiak
Method Summary |
Lock |
getLock(Object key)
Returns an existing lock on the specified key or creates a new one if none was found. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalLockFactory
public LocalLockFactory()
getLock
public Lock getLock(Object key)
- Description copied from interface:
LockFactory
- Returns an existing lock on the specified key or creates a new one if none was found. This
operation should be thread safe.
- Specified by:
getLock
in interface LockFactory
- Parameters:
key
- the object that defines the visibility or scope of the lock.
- Returns:
- an existing lock on the specified key or creates a new one if none was found.
Copyright © 2003-2007 Jive Software.