public class Monitor
extends java.lang.Object
implements java.lang.Runnable, java.io.Serializable
LocalCable
,
Serialized FormConstructor and Description |
---|
Monitor(RunnableInstance sn) |
Monitor(RunnableInstance sn,
RunnableInstance rn,
Node innode)
Creates a new monitor for a particular connection name and a RunnableInstance object (i.e.
|
Modifier and Type | Method and Description |
---|---|
void |
block(boolean put)
Blocks until the unit is ready to receivd the data/the data is sent
|
void |
empty()
Flushes the data out of the pipes
|
void |
finalize()
When the garbage collector de-allocates space from this object we reset all references to other object we have
used
|
java.lang.Object |
get()
The Receiving unit calls this method when it wants to receive data.
|
boolean |
isReady()
The Receiving unit calls this method when it wants to receive data which may or may not be there.
|
void |
myNotify()
Replaces the basic notifyAll fuction to keep a note of whether this monitor is being notified or released
|
void |
put(java.lang.Object data)
The Sending unit calls this method when it has data which is ready to be sent to the receiving unit.
|
void |
putButDontBlock(java.lang.Object data)
This puts the data on this connection but does not block the unit.
|
void |
release()
Makes the tempdata available by releasing the monitor and waking up the receiving unit.
|
void |
run()
Release the data to the receving task.
|
public Monitor(RunnableInstance sn, RunnableInstance rn, Node innode)
public Monitor(RunnableInstance sn)
public void put(java.lang.Object data) throws EmptyingException
EmptyingException
public void putButDontBlock(java.lang.Object data)
public void block(boolean put) throws EmptyingException
EmptyingException
public void release()
public java.lang.Object get() throws EmptyingException
EmptyingException
public void myNotify()
public void run()
run
in interface java.lang.Runnable
public void empty()
public boolean isReady()
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable