uka.karmi.rmi.server
Class ReplicatedServerRef.ExclusiveLock
java.lang.Object
uka.karmi.rmi.server.ReplicatedServerRef.ExclusiveLock
- Enclosing class:
- ReplicatedServerRef
- public class ReplicatedServerRef.ExclusiveLock
- extends java.lang.Object
Note: The exclusive lock process extends the regular call
protocol to:
openSendCall() // in sendRequestLock()
send(ticket) //
closeSendCall() //
receive(boolean) // in awaitLock(): blocking await
receive(problem) // the remote lock acquisition.
send(unlock) // in sendRequestUnlock(): make
send(notify) // the remote representative thread
flush() // leave its doSynchronized() block.
openReceiveResult() // in awaitWaitCompletion()
receive(problem) //
closeReceiveResult() //
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ticket
int ticket
owner
final java.lang.Thread owner
connections
ClientConnection[] connections
waitConnections
ClientConnection[] waitConnections
numberOfLocks
protected int numberOfLocks
- If a lock is aquired more then once, a local count-variable is
incremented.
ReplicatedServerRef.ExclusiveLock
public ReplicatedServerRef.ExclusiveLock()
ReplicatedServerRef.ExclusiveLock
protected ReplicatedServerRef.ExclusiveLock(int ticket)
throws java.io.IOException
checkOwner
public void checkOwner()
requestTicket
void requestTicket()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
sendRequestLock
void sendRequestLock()
throws java.io.IOException
- Throws:
java.io.IOException
awaitLock
void awaitLock()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
sendRequestUnlock
void sendRequestUnlock(boolean isNotified)
throws java.io.IOException
- Throws:
java.io.IOException
awaitCompletion
void awaitCompletion()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
sendWaitRequest
void sendWaitRequest()
throws java.io.IOException
- Throws:
java.io.IOException
awaitWaitCompletion
void awaitWaitCompletion()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
closeWaitConnections
void closeWaitConnections()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
lock
void lock()
unlock
void unlock()
isNested
boolean isNested()
getTicket
int getTicket()
setTicket
void setTicket(int ticket)