org.objectweb.perseus.concurrency.lib
Class RWLockValue
java.lang.Object
org.objectweb.perseus.concurrency.lib.RWLockValue
- All Implemented Interfaces:
- LockValue
- public class RWLockValue
- extends java.lang.Object
- implements LockValue
Simple lock value comparator. Possible values are:
- nolock (compatible w/ any lock level)
- read (compatible w/ nolocks and other reads)
- upgrade (compatible only w/ nolocks)
- write (compatible only w/ nolocks)
From a compatibility point of view upgrade lock requests are equivalent
to exclusive lock request. However, distinguishing the two can
be convenient in the treatement of requests (two upgrades on the same
object automatically leads to a deadlock)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
READ
public static final byte READ
- See Also:
- Constant Field Values
UPGRADE
public static final byte UPGRADE
- See Also:
- Constant Field Values
WRITE
public static final byte WRITE
- See Also:
- Constant Field Values
RWLockValue
public RWLockValue()
maxValue
public byte maxValue()
- Specified by:
maxValue
in interface LockValue
isCompatibleWith
public boolean isCompatibleWith(byte l1,
byte l2)
- Specified by:
isCompatibleWith
in interface LockValue
getCompatibleWith
public byte getCompatibleWith(byte l1,
byte l2)
- Specified by:
getCompatibleWith
in interface LockValue
str
public java.lang.String str(byte l)
- Specified by:
str
in interface LockValue
Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.