|
|||||||||
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
edu.ucdavis.rj.Ops.OpInni
public class OpInni
An operation that's to be serviced via inni.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface edu.ucdavis.rj.Ops.OpRemote |
---|
OpRemote.Helper |
Field Summary | |
---|---|
private static int |
defaultSemValue
|
protected java.util.List<Invocation> |
msgList
|
static OpInni |
noop
Invoking the noop operation via send has no effect. |
(package private) static long |
serialVersionUID
|
protected InLock |
theLock
|
protected java.util.List<Invocation> |
waitList
|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
OpInni()
Create a new instance of an operation that's to be serviced via inni. |
|
OpInni(boolean aNoop)
|
Method Summary | |
---|---|
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. |
OpInniIterator |
elements()
Get an iterator to iterate over pending invocations of this operation. |
long |
getFirstTime()
Return timestamp (>=0) of first invocation in this queue, if there are any invocations; otherwise, return -1. |
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? |
int |
length()
Returns the number of Invocations pending for this operation. |
static OpInni |
newOpInni()
Instantiate an OpInni . |
static OpInni |
newSem()
///////////////////////////// |
static OpInni |
newSem(int initialSemValue)
Instantiate an OpInni that looks somewhat like a semaphore. |
Invocation |
P()
/////////////// |
Invocation |
receive()
Get the first (oldest) pending invocation of this operation. |
void |
send(Invocation originalInv)
Invoke this operation asynchronously. |
Methods inherited from class edu.ucdavis.rj.Ops.OpImpl |
---|
call, equals, getId, hashCode, isNoop, send, V |
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 |
Field Detail |
---|
static final long serialVersionUID
protected InLock theLock
protected java.util.List<Invocation> msgList
protected java.util.List<Invocation> waitList
private static final int defaultSemValue
public static final OpInni noop
Constructor Detail |
---|
public OpInni() throws java.rmi.RemoteException
java.rmi.RemoteException
OpInni(boolean aNoop) throws java.rmi.RemoteException
java.rmi.RemoteException
Method Detail |
---|
public static OpInni newOpInni()
OpInni
.
This method just calls the appropriate constructor,
but hides the java.rmi.RemoteException
.
OpInni
.public static OpInni newSem(int initialSemValue)
OpInni
that looks somewhat like a semaphore.
The
- initial value of the semaphore.
OpInni
.public static OpInni newSem()
public int length()
length
in interface Op
length
in class OpImpl
public void send(Invocation originalInv)
send
in interface Op
send
in class OpImpl
originalInv
- The invocation to service.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 Invocation receive()
public Invocation P()
public Invocation call(Invocation originalInv)
call
in interface Op
call
in class OpImpl
originalInv
- The invocation to service.
N.B., (the reference for) the returned invocation may not be the
same as originalInv
.
See details under Op.call(edu.ucdavis.rj.Ops.Invocation)
.
public long getFirstTime()
public boolean canAppearInInni() throws java.rmi.RemoteException
Op
OpInni
can.
true
if and only if this operation is an OpInni
.
java.rmi.RemoteException
public InLock getLock() throws java.rmi.RemoteException
Op
java.rmi.RemoteException
public boolean isRemote(java.lang.String site) throws java.rmi.RemoteException
Op
true
if and only if this operation is remote.
java.rmi.RemoteException
public void deliverPendingMessages() throws java.rmi.RemoteException
Op
java.rmi.RemoteException
public OpInniIterator elements() throws java.rmi.RemoteException
Op
java.rmi.RemoteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |