org.apache.james.mailrepository.javamail
Interface LockInterface

All Known Implementing Classes:
LockAdapter

public interface LockInterface

Interface for org.apache.james.util.Lock functionality to be able to replace implementation or using Mock-objects at tests

See Also:
Lock

Method Summary
 boolean isLocked(java.lang.Object key)
          Check to see if the object is locked
 boolean lock(java.lang.Object key)
          Lock on a given object.
 boolean unlock(java.lang.Object key)
          Release the lock on a given object.
 

Method Detail

isLocked

boolean isLocked(java.lang.Object key)
Check to see if the object is locked

Parameters:
key - the Object on which to check the lock
Returns:
true if the object is locked, false otherwise

lock

boolean lock(java.lang.Object key)
Lock on a given object.

Parameters:
key - the Object on which to lock
Returns:
true if the locking was successful, false otherwise

unlock

boolean unlock(java.lang.Object key)
Release the lock on a given object.

Parameters:
key - the Object on which the lock is held
Returns:
true if the unlocking was successful, false otherwise


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.