Modifier and Type | Method and Description |
---|---|
Invocation |
call()
Invoke this operation synchronously.
|
Invocation |
call(Invocation originalInv)
Invoke this operation synchronously.
|
boolean |
canAppearInInni()
Can this operation be serviced by an inni?
Only an
OpInni can. |
void |
deliverPendingMessages()
If operation's queue of pending invocations was locked due
to equivalence class locking stuff (e.g., merging),
then deliver pending messages.
|
edu.ucdavis.rj.OpInniIterator |
elements()
Get an iterator to iterate over
pending invocations of this operation.
|
long |
getFirstTime()
Get the timestamp of the first (oldest)
pending invocation of this operation.
|
java.lang.String |
getId()
Returns unique identifier for this operation.
|
edu.ucdavis.rj.InLock |
getLock()
Get the equivalence class lock for this operation.
|
boolean |
isNoop()
Determines whether this operation is a
noop . |
boolean |
isRemote(java.lang.String site)
Is this operation on a remote VM or on the current VM?
(Not allowed on an
OpMethod .) |
int |
length()
Returns the number of Invocations pending for this operation.
|
Invocation |
P()
A semaphore P (aka down) operation.
|
Invocation |
receive()
Get the first (oldest) pending invocation of this
OpInni . |
void |
send()
Invoke this operation asynchronously.
|
void |
send(Invocation originalInv)
Invoke this operation asynchronously.
|
void |
V()
A semaphore V (aka up) operation.
|
boolean isNoop() throws java.rmi.RemoteException
noop
.noop
.java.rmi.RemoteException
- if RMI fails.void send(Invocation originalInv) throws java.rmi.RemoteException
originalInv
- The invocation to service.java.rmi.RemoteException
- if RMI fails.void send() throws java.rmi.RemoteException
this.send (new Invocation(...));
See send(edu.ucdavis.rj.Invocation)
.java.rmi.RemoteException
- if RMI fails.void V() throws java.rmi.RemoteException
OpInni
's semaphore operations.java.rmi.RemoteException
- if RMI fails.Invocation call(Invocation originalInv) throws java.rmi.RemoteException
originalInv
- The invocation to service.
N.B., (the reference for) the returned invocation might not be the
same as inv
.
For example, do NOT use, e.g.,
Invocation inv = new Invocation(...);
thefun.call(inv);
System.out.println(inv.getReturnValue());
because inv
's value after the call
will be the same
as its value before the call, and inv.getReturnValue()
will
likely be null
.
Instead, in this example, use
inv = thefun.call(inv);
.
java.rmi.RemoteException
- if RMI fails.Invocation call() throws java.rmi.RemoteException
this.call (new Invocation(...));
See call(edu.ucdavis.rj.Invocation)
.java.rmi.RemoteException
- if RMI fails.Invocation receive() throws java.rmi.RemoteException
OpInni
.
Wait if no invocation is pending.
(Not allowed on an OpMethod
.)java.rmi.RemoteException
- if this Op
is an OpMethod
.Invocation P() throws java.rmi.RemoteException
OpInni
's semaphore operations.
(Not allowed on an OpMethod
.)java.rmi.RemoteException
- if this Op
is an OpMethod
.int length() throws java.rmi.RemoteException
java.rmi.RemoteException
- if RMI fails.java.lang.String getId() throws java.rmi.RemoteException
java.rmi.RemoteException
- if RMI fails.long getFirstTime() throws java.rmi.RemoteException
java.rmi.RemoteException
- if this Op
is an OpMethod
.boolean canAppearInInni() throws java.rmi.RemoteException
OpInni
can.true
if and only if this operation is an OpInni
.java.rmi.RemoteException
- if RMI fails.edu.ucdavis.rj.InLock getLock() throws java.rmi.RemoteException
OpMethod
.)java.rmi.RemoteException
- if RMI fails.boolean isRemote(java.lang.String site) throws java.rmi.RemoteException
OpMethod
.)site
- machine name.true
if and only if this operation is remote.java.rmi.RemoteException
- if RMI fails.void deliverPendingMessages() throws java.rmi.RemoteException
java.rmi.RemoteException
- if this Op
is an OpMethod
.edu.ucdavis.rj.OpInniIterator elements() throws java.rmi.RemoteException
java.rmi.RemoteException
- if this Op
is an OpMethod
.