org.symcomp.spsd
Class AbstractSPSDHandler

java.lang.Object
  extended by org.symcomp.scscp.ProcedureCallHandler
      extended by org.symcomp.spsd.AbstractSPSDHandler
All Implemented Interfaces:
org.symcomp.notification.NotificationReceiver
Direct Known Subclasses:
AllPairsHandler, MapHandler, MapIntervalHandler, ZipHandler

public abstract class AbstractSPSDHandler
extends org.symcomp.scscp.ProcedureCallHandler
implements org.symcomp.notification.NotificationReceiver

is a specialized ProcedureCallHandler prpared for distribution of computations.


Field Summary
protected  java.util.HashMap<java.lang.String,java.lang.Integer> positions
           
protected  org.symcomp.openmath.OpenMathBase[] results
           
protected  java.util.concurrent.BlockingQueue<org.symcomp.scscp.SCSCPClient> workers
           
 
Constructor Summary
AbstractSPSDHandler()
           
 
Method Summary
 org.symcomp.openmath.OMSymbol getServiceName()
           
abstract  int getSPSDNumTasks()
           
abstract  org.symcomp.openmath.OpenMathBase getSPSDTask(int i)
           
 org.symcomp.openmath.OpenMathBase handlePayload(org.symcomp.openmath.OpenMathBase omoo)
           
abstract  void initSPSDComputation(org.symcomp.openmath.OpenMathBase omoo)
           
 void receiveNotification(org.symcomp.notification.Notification notification)
           
 int setWorkers(java.util.Collection<org.symcomp.scscp.SCSCPClient> workers)
           
 
Methods inherited from class org.symcomp.scscp.ProcedureCallHandler
getDescription, getServiceNames, getServiceNameStr, handle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

workers

protected java.util.concurrent.BlockingQueue<org.symcomp.scscp.SCSCPClient> workers

results

protected org.symcomp.openmath.OpenMathBase[] results

positions

protected java.util.HashMap<java.lang.String,java.lang.Integer> positions
Constructor Detail

AbstractSPSDHandler

public AbstractSPSDHandler()
Method Detail

getServiceName

public org.symcomp.openmath.OMSymbol getServiceName()
Overrides:
getServiceName in class org.symcomp.scscp.ProcedureCallHandler

setWorkers

public int setWorkers(java.util.Collection<org.symcomp.scscp.SCSCPClient> workers)

initSPSDComputation

public abstract void initSPSDComputation(org.symcomp.openmath.OpenMathBase omoo)
                                  throws org.symcomp.openmath.OpenMathException
Throws:
org.symcomp.openmath.OpenMathException

getSPSDNumTasks

public abstract int getSPSDNumTasks()

getSPSDTask

public abstract org.symcomp.openmath.OpenMathBase getSPSDTask(int i)

handlePayload

public org.symcomp.openmath.OpenMathBase handlePayload(org.symcomp.openmath.OpenMathBase omoo)
                                                throws org.symcomp.openmath.OpenMathException
Overrides:
handlePayload in class org.symcomp.scscp.ProcedureCallHandler
Throws:
org.symcomp.openmath.OpenMathException

receiveNotification

public void receiveNotification(org.symcomp.notification.Notification notification)
Specified by:
receiveNotification in interface org.symcomp.notification.NotificationReceiver


Copyright © 2010. All Rights Reserved.