public abstract class OpMethod extends OpImpl
Modifier and Type | Class and Description |
---|---|
(package private) class |
OpMethod.T1 |
OpRemote.Helper
Modifier and Type | Field and Description |
---|---|
(package private) static long |
serialVersionUID |
Constructor and Description |
---|
OpMethod()
Create a new instance of an operation that's to be serviced
via a method.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAppearInInni()
Can this operation be serviced by an inni?
Only an
OpInni can. |
abstract void |
codeBlock(Invocation inv)
Override this method
with the actual code for the operation.
|
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.
|
long |
getFirstTime()
Get the timestamp of the first (oldest)
pending invocation of this operation.
|
InLock |
getLock()
Get the equivalence class lock for this operation.
|
(package private) void |
internalSend(Invocation inv)
Internal asynchronous invocation.
|
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 . |
call, call, equals, getId, hashCode, isNoop, send, send, V
static final long serialVersionUID
public OpMethod() throws java.rmi.RemoteException
java.rmi.RemoteException
- if RMI fails.void internalSend(Invocation inv)
internalSend
in class OpImpl
inv
- The invocation to service.
It is assumed to have already been cloned
and its replyOp set properly (null for send; non-null for call).public abstract void codeBlock(Invocation inv)
inv
- The invocation to service.public Invocation receive()
Op
OpInni
.
Wait if no invocation is pending.
(Not allowed on an OpMethod
.)public long getFirstTime()
Op
public boolean canAppearInInni() throws java.rmi.RemoteException
Op
OpInni
can.true
if and only if this operation is an OpInni
.java.rmi.RemoteException
- if RMI fails.public InLock getLock() throws java.rmi.RemoteException
Op
OpMethod
.)java.rmi.RemoteException
- if RMI fails.public boolean isRemote(java.lang.String site) throws java.rmi.RemoteException
Op
OpMethod
.)site
- machine name.true
if and only if this operation is remote.java.rmi.RemoteException
- if RMI fails.public void deliverPendingMessages() throws java.rmi.RemoteException
Op
java.rmi.RemoteException
- if this Op
is an OpMethod
.public OpInniIterator elements() throws java.rmi.RemoteException
Op
java.rmi.RemoteException
- if this Op
is an OpMethod
.public Invocation P()
Op
OpInni
's semaphore operations.
(Not allowed on an OpMethod
.)