org.objectweb.perseus.concurrency.distributed.globallock.lib
Class GlobalLockWaiterImpl

java.lang.Object
  extended byorg.objectweb.perseus.concurrency.distributed.globallock.lib.GlobalLockWaiterImpl
All Implemented Interfaces:
GlobalLockWaiter

public class GlobalLockWaiterImpl
extends java.lang.Object
implements GlobalLockWaiter


Method Summary
 byte getLockLevel()
          Get the requested lock level
 void signalHandled()
          Signal that the lock granting has been handled by the waiter and that next waiters can have their requests granted if possible
 boolean signalLock(byte signaledLck, GlobalLockWaiterImpl waitFor)
           
 void waitHandled(long timeout)
           
 boolean waitLock(long timeout)
          Wait until the lock is granted or refused.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

waitHandled

public void waitHandled(long timeout)
                 throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

signalHandled

public void signalHandled()
Description copied from interface: GlobalLockWaiter
Signal that the lock granting has been handled by the waiter and that next waiters can have their requests granted if possible

Specified by:
signalHandled in interface GlobalLockWaiter

waitLock

public boolean waitLock(long timeout)
                 throws java.lang.InterruptedException
Description copied from interface: GlobalLockWaiter
Wait until the lock is granted or refused.

Specified by:
waitLock in interface GlobalLockWaiter
Parameters:
timeout - max time to wait
Returns:
true if the lock is granted, false if refused
Throws:
java.lang.InterruptedException - if the thread has been interrupted

signalLock

public boolean signalLock(byte signaledLck,
                          GlobalLockWaiterImpl waitFor)

getLockLevel

public byte getLockLevel()
Description copied from interface: GlobalLockWaiter
Get the requested lock level

Specified by:
getLockLevel in interface GlobalLockWaiter
Returns:
the requested lock level


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.