edu.ucdavis.rj.Locks
Class InLock_impl
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
edu.ucdavis.rj.Locks.InLock_impl
- All Implemented Interfaces:
- InLock, java.io.Serializable, java.rmi.Remote
public class InLock_impl
- extends java.rmi.server.UnicastRemoteObject
- implements InLock
This class represents a lock for multiple processes trying to access
an InOp's message queue.
EClock feature gives a thread (of which there can be only one active
because of a guarantee through jrx) trying to form an equivalence class
priority.
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary |
InLock_impl(java.lang.String name,
boolean locked)
|
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
ZONE_OFFSET
protected static final long ZONE_OFFSET
DST_OFFSET
protected static final long DST_OFFSET
ISEC
protected static final boolean ISEC
- See Also:
- Constant Field Values
ISMES
protected static final boolean ISMES
- See Also:
- Constant Field Values
MESSAGES
protected static final int MESSAGES
- See Also:
- Constant Field Values
ENTRY
protected static final int ENTRY
- See Also:
- Constant Field Values
ECSELECT
protected static final int ECSELECT
- See Also:
- Constant Field Values
InLock_impl
public InLock_impl(java.lang.String name,
boolean locked)
throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
lock
public void lock()
throws java.rmi.RemoteException
- Specified by:
lock
in interface InLock
- Throws:
java.rmi.RemoteException
lockEC
public void lockEC()
throws java.rmi.RemoteException
- Specified by:
lockEC
in interface InLock
- Throws:
java.rmi.RemoteException
lock
protected void lock(boolean isEClock)
throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
acquireInnerLock
public boolean acquireInnerLock(long mytimestamp,
boolean isEClock)
throws java.rmi.RemoteException
- Specified by:
acquireInnerLock
in interface InLock
- Throws:
java.rmi.RemoteException
lock_or_register
public boolean lock_or_register(OpRemote theop)
throws java.rmi.RemoteException
- Specified by:
lock_or_register
in interface InLock
- Throws:
java.rmi.RemoteException
innerLorR
public boolean innerLorR(OpRemote theop)
throws java.rmi.RemoteException
- Specified by:
innerLorR
in interface InLock
- Throws:
java.rmi.RemoteException
unlock
public void unlock()
throws java.rmi.RemoteException
- Specified by:
unlock
in interface InLock
- Throws:
java.rmi.RemoteException
unlockEC
public void unlockEC()
throws java.rmi.RemoteException
- Specified by:
unlockEC
in interface InLock
- Throws:
java.rmi.RemoteException
unlockMes
public void unlockMes()
throws java.rmi.RemoteException
- Specified by:
unlockMes
in interface InLock
- Throws:
java.rmi.RemoteException
releaseInnerLock
public void releaseInnerLock(boolean isECunlock,
boolean isMesUnlock)
throws java.rmi.RemoteException
- Specified by:
releaseInnerLock
in interface InLock
- Throws:
java.rmi.RemoteException
waitOnLock
public void waitOnLock()
throws java.rmi.RemoteException
- Specified by:
waitOnLock
in interface InLock
- Throws:
java.rmi.RemoteException
waitInnerLock
public long waitInnerLock()
throws java.rmi.RemoteException
- Specified by:
waitInnerLock
in interface InLock
- Throws:
java.rmi.RemoteException
getInnerLock
public InLock getInnerLock()
throws java.rmi.RemoteException
- Specified by:
getInnerLock
in interface InLock
- Throws:
java.rmi.RemoteException
getLockId
public LockId getLockId()
throws java.rmi.RemoteException
- Specified by:
getLockId
in interface InLock
- Throws:
java.rmi.RemoteException
forwardTo
public void forwardTo(InLock lock)
throws java.rmi.RemoteException
- Specified by:
forwardTo
in interface InLock
- Throws:
java.rmi.RemoteException
nextLockNumber
public static int nextLockNumber()