appl.parallel.spmd
Interface SPMDServerInterface

All Known Subinterfaces:
AdvancedSPMDServerInterface
All Known Implementing Classes:
AdvancedSPMDServerController, SPMDServerController

public interface SPMDServerInterface

Using this interface the programmer can access the parallel functionality on server side. The programmer should subclass AbstractSPMDTask and use its method AbstractSPMDTask.getSPMDServerController() to access the parallel control.

Author:
Dominik Appl

Method Summary
 void destroyMultiPartition(String name, int idx)
          Removes the partition from memory.
 void destroyPartition(String name)
          Removes the partition from memory.
 Object getBaseParameter(String parameterName)
          Returns the base parameter with the specified id.
 Rectangle getGlobalBounds(DataPartition partition)
          Gives back the global bounds, which are the bounds of all partitions over all servers.
 Rectangle getLocalBounds()
          Gives back the area which is available for local access (including Neighborhood)
 Rectangle getLocalBounds(DataPartition partition)
          Gives back the area which is available for local access (including Neighborhood)
 int getLocalCalcMaxX()
          Convenience method.
 int getLocalCalcMaxY()
          Convenience method.
 int getLocalCalcMinX()
          Convenience method.
 int getLocalCalcMinY()
          Convenience method.
 Rectangle getLocalCalculationBounds()
          Gives back the area which is actively used for read/write (in contrast to neighborhood area, which is often accessed will be accessed read only).
 Rectangle getLocalCalculationBounds(DataPartition partition)
          Gives back the area which is actively used for read/write (in contrast to neighborhood area, which is often accessed will be accessed read only).
 MultiDataObject getMultiData(String name)
          Gives back a MultiDataObject.
 DataPartition[] getMultiPartition(String name)
          Gets the array of DataPartitions which were submitted on client side via SPMDClientController.addToMultiDataSplitControl(Object[], String) All resources are retrieved from the data source and given back.
 DataPartition getMultiPartition(String name, int idx)
          Gets a DataPartition which was submitted on client side via SPMDClientController.addToMultiDataSplitControl(Object[], String).
 DataPartition getPartition(String name)
          The whole DataPartition available for this task.
 

Method Detail

getBaseParameter

Object getBaseParameter(String parameterName)
Returns the base parameter with the specified id.

Parameters:
parameterName - the name of the parameter specified on client side
Returns:
the base parameter
See Also:
SPMDClientInterface.addBaseParameter(Object, String)

getLocalCalculationBounds

Rectangle getLocalCalculationBounds(DataPartition partition)
Gives back the area which is actively used for read/write (in contrast to neighborhood area, which is often accessed will be accessed read only).

Parameters:
partition - a partition for which the the bounds are requested
Returns:
the calculation bounds in local coordinates (local means relative to the upper left corner of all available data)

getLocalBounds

Rectangle getLocalBounds(DataPartition partition)
Gives back the area which is available for local access (including Neighborhood)

Parameters:
partition - a partition for which the the bounds are requested
Returns:
the calculation bounds in local coordinates - the upper left corner of the Rectangle will be (0,0)

getGlobalBounds

Rectangle getGlobalBounds(DataPartition partition)
Gives back the global bounds, which are the bounds of all partitions over all servers. To be clear: This are the bounds of the unsplitted data!

Parameters:
partition - partition for which the bounds are queried
Returns:
the global bounds

getLocalCalculationBounds

Rectangle getLocalCalculationBounds()
Gives back the area which is actively used for read/write (in contrast to neighborhood area, which is often accessed will be accessed read only).

Returns:
the calculation bounds in local coordinates (local means relative to the upper left corner of all available data) of the reference resource (which is the first resource added to split-control on client side)
See Also:
SPMDClientController.addToSplitControl(Object, String), SPMDClientController.setReferenceResource(Object)

getLocalBounds

Rectangle getLocalBounds()
Gives back the area which is available for local access (including Neighborhood)

Returns:
the calculation bounds in local coordinates of the reference resource (which is the first resource added to split-control on client side) - the upper left corner of the Rectangle will be (0,0)
See Also:
SPMDClientController.addToSplitControl(Object, String), SPMDClientController.setReferenceResource(Object)

getPartition

DataPartition getPartition(String name)
The whole DataPartition available for this task. In contrast to getLocalCalculationBounds() the neighborhood is included!

Parameters:
name - the name of the splittable
Returns:
the partition of the resource which is available for local calculation
See Also:
SPMDClientController.addToSplitControl(Object, String)

getMultiPartition

DataPartition[] getMultiPartition(String name)
Gets the array of DataPartitions which were submitted on client side via SPMDClientController.addToMultiDataSplitControl(Object[], String) All resources are retrieved from the data source and given back. If you only need a specific resource you can use getMultiPartition(String, int) to avoid loading all data.

Parameters:
name - the name of the splittable
Returns:
the partition of the resource which is available for local calculation
See Also:
SPMDClientController.addToMultiDataSplitControl(Object[], String), getMultiPartition(String, int)

getMultiData

MultiDataObject getMultiData(String name)
Gives back a MultiDataObject. A MultiDataObject can encapsulate multiple objects and is especially intended for use with GridList and MultiGrid types. See MultiDataObject for more details.

Parameters:
name - the name associated with the object on client side
Returns:
the MDO

getMultiPartition

DataPartition getMultiPartition(String name,
                                int idx)
Gets a DataPartition which was submitted on client side via SPMDClientController.addToMultiDataSplitControl(Object[], String). Only the grid with the index is returned. All other partitions are NOT retrieved.

Parameters:
name - the name of the splittable
idx -
Returns:
the partition of the resource which is available for local calculation
See Also:
SPMDClientController.addToMultiDataSplitControl(Object[], String), getMultiPartition(String)

getLocalCalcMinX

int getLocalCalcMinX()
Convenience method. Gets the coordinate out from the Rectangle which the getLocalCalculationBounds() returns

Returns:
the x-coordinate upperleft corner of the calcarea
See Also:
SPMDServerController.getLocalCalculationBounds(), SPMDServerController.getLocalCalcMinX(), SPMDServerController.getLocalCalcMaxX(), SPMDServerController.getLocalCalcMinY(), SPMDServerController.getLocalCalcMaxY()

getLocalCalcMinY

int getLocalCalcMinY()
Convenience method. Gets the coordinate out from the Rectangle which the getLocalCalculationBounds() returns

Returns:
the y-coordinate upper left corner of the calculation area
See Also:
SPMDServerController.getLocalCalculationBounds(), SPMDServerController.getLocalCalcMinX(), SPMDServerController.getLocalCalcMaxX(), SPMDServerController.getLocalCalcMinY(), SPMDServerController.getLocalCalcMaxY()

getLocalCalcMaxX

int getLocalCalcMaxX()
Convenience method. Gets the coordinate out from the Rectangle which the getLocalCalculationBounds() returns

Returns:
the x-coordinate lower right corner of the calculation area
See Also:
SPMDServerController.getLocalCalculationBounds(), SPMDServerController.getLocalCalcMinX(), SPMDServerController.getLocalCalcMaxX(), SPMDServerController.getLocalCalcMinY(), SPMDServerController.getLocalCalcMaxY()

getLocalCalcMaxY

int getLocalCalcMaxY()
Convenience method. Gets the coordinate out from the Rectangle which the getLocalCalculationBounds() returns

Returns:
the y-coordinate lower right corner of the calculation area
See Also:
SPMDServerController.getLocalCalculationBounds(), SPMDServerController.getLocalCalcMinX(), SPMDServerController.getLocalCalcMaxX(), SPMDServerController.getLocalCalcMinY(), SPMDServerController.getLocalCalcMaxY()

destroyPartition

void destroyPartition(String name)
Removes the partition from memory. You may want to call System.gc() afterwards

Parameters:
name - the name of the partition to remove

destroyMultiPartition

void destroyMultiPartition(String name,
                           int idx)
Removes the partition from memory. You may want to call System.gc() afterwards

Parameters:
name - the name of the multidata
idx - the index of the partition to remove