public class OpProxy extends java.lang.Object implements java.io.Serializable, Op
f,
just use new OpProxy(f).| Modifier and Type | Field and Description |
|---|---|
private int |
cachedImplHashCode |
private java.lang.String |
cachedImplId |
private boolean |
cachedImplIsNoop |
private OpRemote |
impl |
| Modifier and Type | Method and Description |
|---|---|
Invocation |
call()
Invoke this operation synchronously.
|
Invocation |
call(Invocation inv)
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.
|
OpInniIterator |
elements()
Get an iterator to iterate over
pending invocations of this operation.
|
boolean |
equals(java.lang.Object other)
Two OpProxys are equal if their OpRemotes are.
|
long |
getFirstTime()
Get the timestamp of the first (oldest)
pending invocation of this operation.
|
java.lang.String |
getId()
Returns unique identifier for this operation.
|
InLock |
getLock()
Get the equivalence class lock for this operation.
|
OpRemote |
getOpRemote()
Access method to return proxy's implementation.
|
int |
hashCode()
// force hashing to use equals.
|
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 inv)
Invoke this operation asynchronously.
|
void |
V()
A semaphore V (aka up) operation.
|
private OpRemote impl
private java.lang.String cachedImplId
private boolean cachedImplIsNoop
private int cachedImplHashCode
public OpProxy(OpRemote impl)
public OpRemote getOpRemote()
OpRemote implementation.public java.lang.String getId()
throws java.rmi.RemoteException
Oppublic boolean isNoop()
throws java.rmi.RemoteException
Opnoop.public long getFirstTime()
throws java.rmi.RemoteException
OpgetFirstTime in interface Opjava.rmi.RemoteException - if this Op is an OpMethod.public boolean canAppearInInni()
throws java.rmi.RemoteException
OpOpInni can.canAppearInInni in interface Optrue if and only if this operation is an OpInni.java.rmi.RemoteException - if RMI fails.public InLock getLock() throws java.rmi.RemoteException
OpOpMethod.)public boolean isRemote(java.lang.String site)
throws java.rmi.RemoteException
OpOpMethod.)public void deliverPendingMessages()
throws java.rmi.RemoteException
OpdeliverPendingMessages in interface Opjava.rmi.RemoteException - if this Op is an OpMethod.public OpInniIterator elements() throws java.rmi.RemoteException
Oppublic void send(Invocation inv) throws java.rmi.RemoteException
Oppublic void send()
throws java.rmi.RemoteException
Opthis.send (new Invocation(...));
See Op.send(edu.ucdavis.rj.Invocation).public void V()
throws java.rmi.RemoteException
OpOpInni's semaphore operations.public Invocation call(Invocation inv) throws java.rmi.RemoteException
Opcall in interface Opinv - 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.public Invocation call() throws java.rmi.RemoteException
Opthis.call (new Invocation(...));
See Op.call(edu.ucdavis.rj.Invocation).public Invocation receive() throws java.rmi.RemoteException
Oppublic Invocation P() throws java.rmi.RemoteException
Oppublic int length()
throws java.rmi.RemoteException
Oppublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - The other Object to compare.true if and only if equal.public int hashCode()
hashCode in class java.lang.Object