ariba.util.core
Class ObjectLockManager

java.lang.Object
  extended by ariba.util.core.ObjectLockManager
Direct Known Subclasses:
FileLockManager

public class ObjectLockManager
extends java.lang.Object

This class maintains a set of objects that can be exclusively locked. There are two methods: lock and unlock. The call to "lock(o)" doesn't return until an exclusive lock is set on object o; the call to "unlock(o)" releases the lock on o.


Constructor Summary
ObjectLockManager()
          Creates a new ObjectLockManager.
 
Method Summary
 void lock(java.lang.Object o)
          Sets an exclusive lock on the specified object.
 void unlock(java.lang.Object o)
          Releases the lock on the specified object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectLockManager

public ObjectLockManager()
Creates a new ObjectLockManager.

Method Detail

lock

public void lock(java.lang.Object o)
Sets an exclusive lock on the specified object. This method doesn't return until it acquires a lock for the object.

Parameters:
o - - the object on which to set a lock

unlock

public void unlock(java.lang.Object o)
Releases the lock on the specified object. This method asserts that the specified object is already locked.

Parameters:
o - - the object whose lock should be released


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.