Openfire 3.5.0.rc1 Javadoc

org.jivesoftware.util.lock
Interface LockFactory

All Known Implementing Classes:
LocalLockFactory

public interface LockFactory

Factory that creates new Locks for specified keys and keeps them in memory until they are no longer needed.

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.
 

Method Detail

getLock

Lock getLock(Object key)
Returns an existing lock on the specified key or creates a new one if none was found. This operation should be thread safe.

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.

Openfire 3.5.0.rc1 Javadoc

Copyright © 2003-2007 Jive Software.