appl.parallel.client
Class ClientDataServer

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by appl.parallel.client.ClientDataServer
All Implemented Interfaces:
DataServer, Serializable, Remote

public class ClientDataServer
extends UnicastRemoteObject
implements DataServer

This class is used for storing all data which is needed for parallelization and may be requested remotely. On DataPartitions the request of partitions is supported. PartitionDataServers running on XuluServers will typically use DataHandlers for retrieving the partitions.

Author:
Dominik Appl
See Also:
PartitionDataServer, Serialized Form

Field Summary
protected  Logger LOG
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
ClientDataServer(CommEventSink eventSink)
          The standard Constructor (binds itself to the running registry)
 
Method Summary
 void addData(DataPartition splittable)
          DataPartitions can be added
 void close()
          stops the client and removes it from the registry
 DataPartition getData(int baseID)
          Returns the data identified by the given id
 DataPartition getPartition(int id, Rectangle bounds)
          gets the data with the id of a SplittableRessource
 void removeData(int id)
          Removes the partition with the specified id.
 void updatePartition(int id, DataPartition partition, Rectangle bounds)
          sets the data with the id of a SplittableRessource
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

protected final Logger LOG
Constructor Detail

ClientDataServer

public ClientDataServer(CommEventSink eventSink)
                 throws RemoteException
The standard Constructor (binds itself to the running registry)

Parameters:
eventSink - the sink is used for generating events
Throws:
RemoteException - if the connection fails
Method Detail

getData

public DataPartition getData(int baseID)
                      throws RemoteException
Returns the data identified by the given id

Specified by:
getData in interface DataServer
Parameters:
baseID - Id identifiying the data
Returns:
the partition
Throws:
RemoteException - if the connection to the server fails
See Also:
SplittableResource.getRootID()

addData

public void addData(DataPartition splittable)
DataPartitions can be added

Specified by:
addData in interface DataServer
Parameters:
splittable - the partition to add
See Also:
DataServer.addData(appl.parallel.spmd.split.DataPartition)

close

public void close()
stops the client and removes it from the registry


getPartition

public DataPartition getPartition(int id,
                                  Rectangle bounds)
                           throws RemoteException
Description copied from interface: DataServer
gets the data with the id of a SplittableRessource

Specified by:
getPartition in interface DataServer
Parameters:
id - the ID of a the base data
bounds - the bounds of the partition to retrieve (using global coordinates)
Returns:
the partition
Throws:
RemoteException

updatePartition

public void updatePartition(int id,
                            DataPartition partition,
                            Rectangle bounds)
                     throws RemoteException
Description copied from interface: DataServer
sets the data with the id of a SplittableRessource

Specified by:
updatePartition in interface DataServer
Parameters:
id - the ID of a the base data
partition - the updateData (which may only a partitial update, depending on the bounds set with the last parameter)
bounds - the location where the partition is to be updated (using global coordinates)
Throws:
RemoteException

removeData

public void removeData(int id)
Description copied from interface: DataServer
Removes the partition with the specified id.

Specified by:
removeData in interface DataServer
Parameters:
id - id of the partition to remove