appl.parallel.data
Class XuluClientLoader

java.lang.Object
  extended by appl.parallel.data.AbstractDataHandler
      extended by appl.parallel.data.XuluClientLoader
All Implemented Interfaces:
DataLoader, DataUnloader, DataLoadHandler, PartitionDataHandler, Serializable, Cloneable

public class XuluClientLoader
extends AbstractDataHandler
implements PartitionDataHandler

Loads partitioned data from a ClientDataServer. And unloads the data

Author:
Dominik Appl
See Also:
Serialized Form

Field Summary
protected  InetAddress address
           
protected  String namingString
           
 
Fields inherited from class appl.parallel.data.AbstractDataHandler
data, LOG, partitionBounds, rootID, spmdClient, unloadBounds
 
Constructor Summary
XuluClientLoader()
          Used for deserialization.
XuluClientLoader(int rootID, ClientDataServer client, Rectangle partitionBounds, Rectangle unloadBounds)
          constructs a new XuluClientLoader.
XuluClientLoader(int rootID, ClientDataServer client, Rectangle partitionBounds, Rectangle unloadBounds, String unloadTarget)
          constructs a new XuluClientLoader.
 
Method Summary
 String getLoadInfo()
           
 String getUnloadInfo()
           
 DataPartition load()
          On invocation the data is loaded and returned
 XuluClientLoader newInstance(int rootID, ClientDataServer client, Rectangle partitionBounds, Rectangle unloadBounds)
           
 void unload()
          unloads the Data to a specific location
 
Methods inherited from class appl.parallel.data.AbstractDataHandler
clone, setBasePartition, setRootID, setSPMDClient, setUnloadBounds
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface appl.parallel.data.PartitionDataHandler
clone, setBasePartition, setRootID, setSPMDClient, setUnloadBounds
 

Field Detail

address

protected InetAddress address

namingString

protected String namingString
Constructor Detail

XuluClientLoader

public XuluClientLoader(int rootID,
                        ClientDataServer client,
                        Rectangle partitionBounds,
                        Rectangle unloadBounds)
constructs a new XuluClientLoader. The local IP adress at the time of construction is later used on serverside for communication (e.g. unloading).

Parameters:
rootID - the id of the data
partitionBounds - the bounds of the partition to be retrieved on server side
unloadBounds - the bounds of the partition which is to be uploaded to the client after calculation

XuluClientLoader

public XuluClientLoader(int rootID,
                        ClientDataServer client,
                        Rectangle partitionBounds,
                        Rectangle unloadBounds,
                        String unloadTarget)
constructs a new XuluClientLoader. The unloading is done to the DataServer at the machine given with the parameter unloadTarget (IP/Adress or Hostname).

Parameters:
rootID - the id of the data
partitionBounds - the bounds of the partition to be retrieved on server side
unloadBounds - the bounds of the partition which is to be uploaded to the client after calculation

XuluClientLoader

public XuluClientLoader()
Used for deserialization. Do not use for other purposes

Method Detail

newInstance

public XuluClientLoader newInstance(int rootID,
                                    ClientDataServer client,
                                    Rectangle partitionBounds,
                                    Rectangle unloadBounds)
Specified by:
newInstance in interface PartitionDataHandler
Parameters:
rootID - the id of the data
partitionBounds - the bounds of the partition to be retrieved on server side
unloadBounds - the bounds of the partition which is to be uploaded to the client after calculation
Returns:
the new instance

getLoadInfo

public String getLoadInfo()
Specified by:
getLoadInfo in interface DataLoader
Specified by:
getLoadInfo in class AbstractDataHandler
Returns:
some general information about the loading class (like what the class exactly loads)

getUnloadInfo

public String getUnloadInfo()
Specified by:
getUnloadInfo in interface DataUnloader
Specified by:
getUnloadInfo in class AbstractDataHandler
Returns:
a short description of what the class exactly does

load

public DataPartition load()
                   throws LoadingException
Description copied from interface: DataLoader
On invocation the data is loaded and returned

Specified by:
load in interface DataLoader
Specified by:
load in interface PartitionDataHandler
Specified by:
load in class AbstractDataHandler
Returns:
the newly loaded object
Throws:
LoadingException - if for some reason the data could not be loaded

unload

public void unload()
Description copied from interface: DataUnloader
unloads the Data to a specific location

Specified by:
unload in interface DataUnloader
Specified by:
unload in class AbstractDataHandler