eaLib API Docs
Last Modified : January 7 2002

mss.ea.al
Class ThreadOperator

java.lang.Object
  |
  +--mss.ea.core.GeneticOperator
        |
        +--mss.ea.al.ThreadOperator
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
ConditionalThread, GateThread, NotificationThread, SingleThread, SinkThread, SourceThread

Deprecated. superceded by new thread communication model

public abstract class ThreadOperator
extends GeneticOperator
implements java.lang.Runnable

Abstract base class for genetic operators with thread support. This class provides a generic interface for all classes that can be plugged into a multithreaded algorithm.

Since:
0.1
Version:
$Revision: 1.6 $ $Date: 2001/11/12 17:22:13 $
Author:
Andreas Rummler

Field Summary
protected  int inputs
          Deprecated. Number of inputs of the operator.
protected  int outputs
          Deprecated. Number of outputs of the operator.
protected  java.util.List predecessorList
          Deprecated. List of predecessors of this operator.
protected  java.util.List successorList
          Deprecated. List of successors of this operator.
protected  java.util.List successorNotificationList
          Deprecated. List of successors of this operator that should be notified.
protected  ThreadSynchronization sync
          Deprecated.  
protected  boolean terminate
          Deprecated. Flag if this operator should terminate it's work.
protected  java.lang.Thread thread
          Deprecated. Thread this operator runs in.
 
Fields inherited from class mss.ea.core.GeneticOperator
description, ID, name
 
Constructor Summary
ThreadOperator()
          Deprecated. Constructor.
ThreadOperator(int preSize, int succSize)
          Deprecated. Constructor with number of predecessors and successors.
 
Method Summary
 void addPredecessor(ThreadOperator to)
          Deprecated. Adds a new predecessor to the end of the internal list of this operator.
 void addPredecessor(ThreadOperator to, int inputSlot)
          Deprecated. Adds a new predecessor to one of the slots in this operator.
abstract  void addStream(IndividualStream is)
          Deprecated. Adds a stream to this operator.
 void addSuccessor(ThreadOperator to)
          Deprecated. Adds a new successor to the internal list of this operator.
 void addSuccessor(ThreadOperator to, int outputSlot)
          Deprecated. Adds a new successor to one of the slots in this operator.
 int getInputs()
          Deprecated. Gets the number of inputs of this operator.
 int getOutputs()
          Deprecated. Gets the number of outputs of this operator.
 java.util.List getPredecessors()
          Deprecated.  
 java.util.List getSuccessors()
          Deprecated.  
 java.lang.Thread getThread()
          Deprecated. Gets the thread this operator runs in.
 void hangup()
          Deprecated. Sets the termination notification.
 boolean isConnected()
          Deprecated. Returns the connection state of this operator.
abstract  void operate()
          Deprecated.  
 void run()
          Deprecated. Runs this operator.
 void setController(ThreadController tc)
          Deprecated.  
 void setSync(ThreadSynchronization ts)
          Deprecated.  
 void setThread(java.lang.Thread t)
          Deprecated. Sets the thread this operator runs in.
 
Methods inherited from class mss.ea.core.GeneticOperator
getDescription, getID, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

predecessorList

protected java.util.List predecessorList
Deprecated. 
List of predecessors of this operator.

successorList

protected java.util.List successorList
Deprecated. 
List of successors of this operator.

successorNotificationList

protected java.util.List successorNotificationList
Deprecated. 
List of successors of this operator that should be notified. By default this list is empty. In this case all successors in successorList are notified. If not only the successor(s) from this list are notified. After notification this list is cleared.

thread

protected java.lang.Thread thread
Deprecated. 
Thread this operator runs in.

sync

protected ThreadSynchronization sync
Deprecated. 

terminate

protected boolean terminate
Deprecated. 
Flag if this operator should terminate it's work.

outputs

protected int outputs
Deprecated. 
Number of outputs of the operator.

inputs

protected int inputs
Deprecated. 
Number of inputs of the operator.
Constructor Detail

ThreadOperator

public ThreadOperator()
Deprecated. 
Constructor. This constructor creates two new LinkedLists for predecessors and successors.

ThreadOperator

public ThreadOperator(int preSize,
                      int succSize)
Deprecated. 
Constructor with number of predecessors and successors. This constructor creates two new LinkedLists for predecessors and successors with the appropriate size. The lists contain null elements by default.
Method Detail

run

public void run()
Deprecated. 
Runs this operator.
Specified by:
run in interface java.lang.Runnable

operate

public abstract void operate()
Deprecated. 

addStream

public abstract void addStream(IndividualStream is)
Deprecated. 
Adds a stream to this operator. This should be done by the predecessing operator to pass a stream of individuals to this operator.
Parameters:
is - individual stream to add to this operator

addPredecessor

public void addPredecessor(ThreadOperator to)
Deprecated. 
Adds a new predecessor to the end of the internal list of this operator. If there is only one valid predecessor, the older one will/should be replaced.
Parameters:
to - new predecessor

addPredecessor

public void addPredecessor(ThreadOperator to,
                           int inputSlot)
Deprecated. 
Adds a new predecessor to one of the slots in this operator. If there is only one valid predecessor, the older one will be replaced and the parameter input will be ignored.
Parameters:
to - new predecessor to add
inputSlot - slot to add predecessor to

addSuccessor

public void addSuccessor(ThreadOperator to)
Deprecated. 
Adds a new successor to the internal list of this operator. If there is only one valid successor, the older one will be replaced.
Parameters:
to - new successor to add

addSuccessor

public void addSuccessor(ThreadOperator to,
                         int outputSlot)
Deprecated. 
Adds a new successor to one of the slots in this operator. If there is only one valid successor, the older one will be replaced and the parameter output will be ignored.
Parameters:
to - new successor to add
outputSlot - output slot to add successor to

getPredecessors

public java.util.List getPredecessors()
Deprecated. 

getSuccessors

public java.util.List getSuccessors()
Deprecated. 

isConnected

public boolean isConnected()
Deprecated. 
Returns the connection state of this operator. This method is not used yet and returns always false.
Returns:
connection state

getInputs

public int getInputs()
Deprecated. 
Gets the number of inputs of this operator. This method is not used yet and returns alway 1.
Returns:
always 1

getOutputs

public int getOutputs()
Deprecated. 
Gets the number of outputs of this operator. This method is not used yet and returns alway 1.
Returns:
always 1

getThread

public java.lang.Thread getThread()
Deprecated. 
Gets the thread this operator runs in.
Returns:
thread this operator runs in

setThread

public void setThread(java.lang.Thread t)
Deprecated. 
Sets the thread this operator runs in.
Parameters:
t - thread this operator runs in

setController

public void setController(ThreadController tc)
Deprecated. 

setSync

public void setSync(ThreadSynchronization ts)
Deprecated. 

hangup

public void hangup()
Deprecated. 
Sets the termination notification.

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS