org.objectweb.perseus.concurrency.distributed.globallock.api
Interface GlobalLockWaiter
- GlobalLockWaiterImpl
public interface GlobalLockWaiter
This interface is used to sychronize with lock requests in asynchronous mode.
It is returned by the upgrade
method of the
GlobalLock
interface. This can be used to ensure FIFO handling
of requests when implementing multilevel lock management.
GlobalLock
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 | waitLock(long timeout) - Wait until the lock is granted or refused.
|
getLockLevel
public byte getLockLevel()
Get the requested lock level
- the requested lock level
signalHandled
public void signalHandled()
Signal that the lock granting has been handled by the waiter and that
next waiters can have their requests granted if possible
waitLock
public boolean waitLock(long timeout)
throws InterruptedException
Wait until the lock is granted or refused.
timeout
- max time to wait
- true if the lock is granted, false if refused
Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.