1 |
package appl.parallel.data; |
2 |
|
3 |
import java.awt.Rectangle; |
4 |
|
5 |
import appl.parallel.client.ClientDataServer; |
6 |
import appl.parallel.spmd.split.DataPartition; |
7 |
import de.appl.data.LoadingException; |
8 |
|
9 |
/** |
10 |
* Responsible for loading and unloading data partitions |
11 |
* |
12 |
* @author Dominik Appl |
13 |
*/ |
14 |
public interface PartitionDataHandler extends DataLoadHandler, Cloneable { |
15 |
|
16 |
/** |
17 |
* sets the bounds of the data to be unloaded so that not all data is |
18 |
* unloaded to the destination. This is for example useful if there is a |
19 |
* neighborhood region which should not be uploaded to the destination. |
20 |
* |
21 |
* @param bounds |
22 |
*/ |
23 |
public void setUnloadBounds(Rectangle bounds); |
24 |
|
25 |
public void setBasePartition(DataPartition data); |
26 |
|
27 |
public void setRootID(int rootID); |
28 |
|
29 |
/** |
30 |
* @param rootID |
31 |
* the id of the data |
32 |
* @param partitionBounds |
33 |
* the bounds of the partition to be retrieved on server side |
34 |
* @param unloadBounds |
35 |
* the bounds of the partition which is to be uploaded to the |
36 |
* client after calculation |
37 |
* @return the new instance |
38 |
*/ |
39 |
public PartitionDataHandler newInstance(int rootID, |
40 |
ClientDataServer spmdClient, Rectangle partitionBounds, |
41 |
Rectangle unloadBounds); |
42 |
|
43 |
public DataPartition load() throws LoadingException; |
44 |
|
45 |
public PartitionDataHandler clone(); |
46 |
|
47 |
/** |
48 |
* sets a local spmd client which MAY be used by the handler for local |
49 |
* access |
50 |
* |
51 |
* @param localSPMDClient |
52 |
*/ |
53 |
public void setSPMDClient(ClientDataServer localSPMDClient); |
54 |
|
55 |
} |