org.apache.james.mailrepository.javamail
Class LockAdapter

java.lang.Object
  extended by org.apache.james.mailrepository.javamail.LockAdapter
All Implemented Interfaces:
LockInterface

public class LockAdapter
extends java.lang.Object
implements LockInterface

Just a simple 1:1 wrapper for org.apache.james.util.Lock that implements the LockInterface

See Also:
Lock, LockInterface

Constructor Summary
LockAdapter()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockAdapter

public LockAdapter()
Method Detail

isLocked

public boolean isLocked(java.lang.Object key)
Description copied from interface: LockInterface
Check to see if the object is locked

Specified by:
isLocked in interface LockInterface
Parameters:
key - the Object on which to check the lock
Returns:
true if the object is locked, false otherwise
See Also:
LockInterface.isLocked(java.lang.Object)

lock

public boolean lock(java.lang.Object key)
Description copied from interface: LockInterface
Lock on a given object.

Specified by:
lock in interface LockInterface
Parameters:
key - the Object on which to lock
Returns:
true if the locking was successful, false otherwise
See Also:
LockInterface.lock(java.lang.Object)

unlock

public boolean unlock(java.lang.Object key)
Description copied from interface: LockInterface
Release the lock on a given object.

Specified by:
unlock in interface LockInterface
Parameters:
key - the Object on which the lock is held
Returns:
true if the unlocking was successful, false otherwise
See Also:
LockInterface.unlock(java.lang.Object)


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