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.


Variable Index

 o isrunning
 o numArgs
 o pathID
 o 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'

Constructor Index

 o Operator()

Method Index

 o 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)
 o connect(int, int, int, String, int, int)
This call is necessary for the persistent SockReadOp.
 o disconnect(int)
This call is necessary for the persistent SockReadOp.
 o exec()
Start any executable - gives a better measure of the end2end perf at the client
 o getInputSource()
gets the input connector stub associated with the given key
 o getInputType()
Should return the input type of the operator
 o getMgr()
 o getOpName()
 o getOutputDest()
gets the output connector stub associated with the given key
 o getOutputType()
Should return the output type of the operator
 o getPathID()
 o getRuntimeDescription()
return the runtime description of an operator, e.g., it's input/output interfaces, run-time configuration, etc.
 o ipBlockSize()
 o isRunning()
returns true if this operator is running
 o kill()
the default implementation of kill() unexports the NinjaRemoteObject and kills all connectors.
 o opBlockSize()
 o 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)
 o setInputSource(int, Object)
sets the input connector stub associated with the given key
 o setMgr(ConnectorMgrIF)
 o setOpName(String)
 o setOutputDest(int, Object)
sets the output connector stub associated with the given key
 o setPathID(int)
 o setRunning(boolean)
set whether this operator is running or not
 o start(DescrOperator)
start this operator running.
 o stop()
stop this operator from running.
 o wakeUp()

Variables

 o numArgs
 protected int numArgs
 o pathID
 protected int pathID
 o 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'

 o isrunning
 protected boolean isrunning

Constructors

 o Operator
 public Operator() throws RemoteException

Methods

 o 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.

 o 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.

 o getInputType
 public String getInputType() throws RemoteException
Should return the input type of the operator

 o getOutputType
 public String getOutputType() throws RemoteException
Should return the output type of the operator

 o opBlockSize
 public abstract int opBlockSize() throws RemoteException
 o ipBlockSize
 public abstract int ipBlockSize() throws RemoteException
 o getRuntimeDescription
 protected DescrOperator getRuntimeDescription()
return the runtime description of an operator, e.g., it's input/output interfaces, run-time configuration, etc.

 o 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)

 o 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)

 o isRunning
 public synchronized boolean isRunning()
returns true if this operator is running

 o setRunning
 public synchronized void setRunning(boolean r)
set whether this operator is running or not

 o exec
 public abstract void exec()
Start any executable - gives a better measure of the end2end perf at the client

 o 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.

 o 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.

 o 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.

 o setInputSource
 public synchronized void setInputSource(int connType,
                                         Object conn) throws IOException
sets the input connector stub associated with the given key

 o getInputSource
 public synchronized Object getInputSource()
gets the input connector stub associated with the given key

 o setOutputDest
 public synchronized void setOutputDest(int connType,
                                        Object conn) throws IOException
sets the output connector stub associated with the given key

 o getOutputDest
 public synchronized Object getOutputDest()
gets the output connector stub associated with the given key

 o setMgr
 public void setMgr(ConnectorMgrIF mgr) throws RemoteException
 o getMgr
 public ConnectorMgrIF getMgr() throws RemoteException
 o setOpName
 public void setOpName(String name) throws RemoteException
 o getOpName
 public String getOpName() throws RemoteException
 o setPathID
 public void setPathID(int ID) throws RemoteException
 o getPathID
 public int getPathID() throws RemoteException
 o wakeUp
 public void wakeUp() throws RemoteException

All Packages  Class Hierarchy  This Package  Previous  Next  Index