public abstract class OpInni extends OpImpl
OpRemote.Helper
Modifier and Type | Field and Description |
---|---|
static int |
defaultSemValue
Default semaphore value is 0.
|
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 |
Constructor and Description |
---|
OpInni()
Create a new instance of an operation that's to be serviced
via inni.
|
Modifier and Type | Method and Description |
---|---|
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 (non-negative) of first invocation in this queue,
if there are any invocations; otherwise, return -1.
|
InLock |
getLock()
Get the equivalence class lock for this operation.
|
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.
|
static OpInni |
newOpInni()
Instantiate an
OpInni . |
static OpInni |
newSem()
Invokes
newSem(int) with 0. |
static OpInni |
newSem(int initialSemValue)
Instantiate an
OpInni that looks somewhat like a semaphore. |
Invocation |
P()
A semaphore P (aka down) operation.
|
Invocation |
receive()
Get the first (oldest) pending invocation of this operation.
|
call, call, equals, getId, hashCode, internalSend, isNoop, send, send, V
static final long serialVersionUID
protected InLock theLock
protected java.util.List<Invocation> msgList
protected java.util.List<Invocation> waitList
public static final int defaultSemValue
newSem()
.public static final OpInni noop
public OpInni() throws java.rmi.RemoteException
java.rmi.RemoteException
- if RMI fails.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.initialSemValue
- The initial value of the semaphore.OpInni
.public static OpInni newSem()
newSem(int)
with 0.public int length()
public Invocation receive()
public Invocation P()
Op
OpInni
's semaphore operations.
(Not allowed on an OpMethod
.)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
- 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
.