|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
edu.ucdavis.rj.Ops.OpImpl
public abstract class OpImpl
Basic operation abstraction.
In general, an OpImpl
shouldn't be passed as a parameter.
Instead, use an OpProxy
.
E.g., if f
is an OpImpl
, then pass new OpProxy(f))
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface edu.ucdavis.rj.Ops.OpRemote |
---|
OpRemote.Helper |
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
OpImpl()
Create an instance of an OpImpl . |
Method Summary | |
---|---|
Invocation |
call()
Invoke this operation synchronously. |
Invocation |
call(Invocation originalInv)
Invoke this operation synchronously. |
boolean |
equals(java.lang.Object other)
Compares this OpImpl object with the specified object,
which can be an OpRemote or an OpProxy . |
java.lang.String |
getId()
Returns unique identifier for this operation. |
int |
hashCode()
Returns a hash code for this OpImpl . |
boolean |
isNoop()
Determines whether this operation is a noop . |
abstract int |
length()
Returns the number of Invocations pending for this operation. |
void |
send()
Invoke this operation asynchronously. |
void |
send(Invocation originalInv)
Invoke this operation asynchronously. |
void |
V()
A semaphore V (aka up) operation. |
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 |
---|
getRef, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.ucdavis.rj.Ops.Op |
---|
canAppearInInni, deliverPendingMessages, elements, getFirstTime, getLock, isRemote, P, receive |
Constructor Detail |
---|
public OpImpl() throws java.rmi.RemoteException
OpImpl
.
java.rmi.RemoteException
Method Detail |
---|
public java.lang.String getId()
Op
getId
in interface Op
public boolean isNoop()
Op
noop
.
isNoop
in interface Op
noop
.public void send(Invocation originalInv)
send
in interface Op
originalInv
- The invocation to service.public void send()
this.send (new Invocation(...));
See Op.send(edu.ucdavis.rj.Ops.Invocation)
.
send
in interface Op
public void V()
Op
OpInni
's semaphore operations.
V
in interface Op
public Invocation call(Invocation originalInv)
call
in interface Op
inv
- 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);
.
public Invocation call()
this.call (new Invocation(...));
See Op.call(edu.ucdavis.rj.Ops.Invocation)
.
call
in interface Op
public abstract int length()
length
in interface Op
public boolean equals(java.lang.Object other)
OpImpl
object with the specified object,
which can be an OpRemote
or an OpProxy
.
equals
in class java.rmi.server.RemoteObject
other
- The other Object
to compare.
true
if and only if the two objects are equal.public int hashCode()
OpImpl
.
The hashCode for noop
is same across all VMs.
The hashCodes for non-noop
s are different on and across VMs.
hashCode
in class java.rmi.server.RemoteObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |