All Packages Class Hierarchy This Package Previous Next Index
Class iceberg.APCpath.operators.Operator
java.lang.Object
|
+----ninja.rmi.NinjaRemoteObject
|
+----iceberg.APCpath.operators.Operator
- public abstract class Operator
- extends NinjaRemoteObject
- implements OperatorIF
An operator is a unit of computation, can have multiple threads running.
There is a single input and a single output.
-
isrunning
-
-
numArgs
-
-
pathID
-
-
runningthreads
- we want to keep track of the threads this
operator is using, just for bookkeeping purposes
(see addRunning(), and removingRunning())
!!any methods that access this Vector should
be synchronized to 'this'
-
Operator()
-
-
addWorker(Thread)
- if the client forks off any threads, it should call
addWorker() (an easy way to do this is to wrap your
Runnable objects with Operator.RegisteredWorker)
-
connect(int, int, int, String, int, int)
- This call is necessary for the persistent SockReadOp.
-
disconnect(int)
- This call is necessary for the persistent SockReadOp.
-
exec()
- Start any executable - gives a better measure of the end2end
perf at the client
-
getInputSource()
- gets the input connector stub associated with the given key
-
getInputType()
- Should return the input type of the operator
-
getMgr()
-
-
getOpName()
-
-
getOutputDest()
- gets the output connector stub associated with the given key
-
getOutputType()
- Should return the output type of the operator
-
getPathID()
-
-
getRuntimeDescription()
- return the runtime description of an operator, e.g.,
it's input/output interfaces, run-time configuration, etc.
-
ipBlockSize()
-
-
isRunning()
- returns true if this operator is running
-
kill()
- the default implementation of kill() unexports the
NinjaRemoteObject and kills all connectors.
-
opBlockSize()
-
-
removeWorker(Thread)
- if the client forks off any threads, it should call
removeWorker(...) (an easy way to do this is to wrap your
Runnable objects with Operator.RegisteredWorker)
-
setInputSource(int, Object)
- sets the input connector stub associated with the given key
-
setMgr(ConnectorMgrIF)
-
-
setOpName(String)
-
-
setOutputDest(int, Object)
- sets the output connector stub associated with the given key
-
setPathID(int)
-
-
setRunning(boolean)
- set whether this operator is running or not
-
start(DescrOperator)
- start this operator running.
-
stop()
- stop this operator from running.
-
wakeUp()
-
numArgs
protected int numArgs
pathID
protected int pathID
runningthreads
protected Vector runningthreads
- we want to keep track of the threads this
operator is using, just for bookkeeping purposes
(see addRunning(), and removingRunning())
!!any methods that access this Vector should
be synchronized to 'this'
isrunning
protected boolean isrunning
Operator
public Operator() throws RemoteException
connect
public synchronized int connect(int pathid,
int srcPort,
int srcConnType,
String ipAddr,
int dstPort,
int dstConnType) throws RemoteException
- This call is necessary for the persistent SockReadOp. It
connects an incoming stream to an outgoing stream. Should be
overridden by subclass.
disconnect
public synchronized void disconnect(int pathid) throws RemoteException
- This call is necessary for the persistent SockReadOp.
Disconnects a connection made earlier for 'pathid'. Should be
overridden by subclass.
getInputType
public String getInputType() throws RemoteException
- Should return the input type of the operator
getOutputType
public String getOutputType() throws RemoteException
- Should return the output type of the operator
opBlockSize
public abstract int opBlockSize() throws RemoteException
ipBlockSize
public abstract int ipBlockSize() throws RemoteException
getRuntimeDescription
protected DescrOperator getRuntimeDescription()
- return the runtime description of an operator, e.g.,
it's input/output interfaces, run-time configuration, etc.
addWorker
protected synchronized void addWorker(Thread t)
- if the client forks off any threads, it should call
addWorker() (an easy way to do this is to wrap your
Runnable objects with Operator.RegisteredWorker)
removeWorker
protected synchronized void removeWorker(Thread t)
- if the client forks off any threads, it should call
removeWorker(...) (an easy way to do this is to wrap your
Runnable objects with Operator.RegisteredWorker)
isRunning
public synchronized boolean isRunning()
- returns true if this operator is running
setRunning
public synchronized void setRunning(boolean r)
- set whether this operator is running or not
exec
public abstract void exec()
- Start any executable - gives a better measure of the end2end
perf at the client
start
public synchronized void start(DescrOperator descrop)
- start this operator running. Descendents of Operator should
override this method to start any required threads, & initialize
any variables.
stop
public synchronized void stop()
- stop this operator from running. Descendants of Operator should
override this method to stop any running threads and close
any open connectors (close connector != kill connector). The
operator does not have to stop immediately--it can wait till
the end of an ADU (application data unit). stop() should not
return until the operator has really stopped.
kill
public void kill() throws IOException, RemoteException
- the default implementation of kill() unexports the
NinjaRemoteObject and kills all connectors.
Descendants of Operator may override this method as necessary.
kill asserts that the operator has already been stopped.
setInputSource
public synchronized void setInputSource(int connType,
Object conn) throws IOException
- sets the input connector stub associated with the given key
getInputSource
public synchronized Object getInputSource()
- gets the input connector stub associated with the given key
setOutputDest
public synchronized void setOutputDest(int connType,
Object conn) throws IOException
- sets the output connector stub associated with the given key
getOutputDest
public synchronized Object getOutputDest()
- gets the output connector stub associated with the given key
setMgr
public void setMgr(ConnectorMgrIF mgr) throws RemoteException
getMgr
public ConnectorMgrIF getMgr() throws RemoteException
setOpName
public void setOpName(String name) throws RemoteException
getOpName
public String getOpName() throws RemoteException
setPathID
public void setPathID(int ID) throws RemoteException
getPathID
public int getPathID() throws RemoteException
wakeUp
public void wakeUp() throws RemoteException
All Packages Class Hierarchy This Package Previous Next Index