1 |
mojays |
2 |
package appl.parallel.spmd.split; |
2 |
|
|
|
3 |
|
|
import appl.data.DataLoader; |
4 |
|
|
|
5 |
|
|
/** |
6 |
|
|
* A resource that is splittable must provide some information to work with {@link SplitMap}s. |
7 |
|
|
* Important is the with and the height of the resource to be splitted. |
8 |
|
|
* |
9 |
|
|
* |
10 |
|
|
* @author Dominik Appl |
11 |
|
|
*/ |
12 |
|
|
public interface SplittableResource extends DataPartition { |
13 |
|
|
/** |
14 |
|
|
* Should return a unique ID for this resource. Standard implementation |
15 |
|
|
* would be returning the {@link Object#hashCode() hashcode} of the object. |
16 |
|
|
* |
17 |
|
|
* @return a ID which is unique for this client |
18 |
|
|
* |
19 |
|
|
*/ |
20 |
|
|
public int getRootID(); |
21 |
|
|
|
22 |
|
|
/** |
23 |
|
|
* Returns the loader which is responible for loading the data. This loader should be |
24 |
|
|
* independet from the current system. This means that, e.g. for a loader which |
25 |
|
|
* loads a grid from filesystem, that all paths should be relative (and not |
26 |
|
|
* absolute), so that a possibly remote resource can load the data from its local |
27 |
|
|
* filesystem, if the data is stored in the same position relative to the home |
28 |
|
|
* directory. |
29 |
|
|
* |
30 |
|
|
* @return a loader for this resource. |
31 |
|
|
*/ |
32 |
|
|
public DataLoader getLocalLoader(); |
33 |
|
|
|
34 |
|
|
/** |
35 |
|
|
* @return the splittable is splitted according to its splitHeight (example: the height of a raster) |
36 |
|
|
* */ |
37 |
|
|
public int getSplitHeight(); |
38 |
|
|
|
39 |
|
|
/** |
40 |
|
|
* @return the splittable is splitted according to its splitWidth (example: the width of a raster or the length of an array) |
41 |
|
|
* */ |
42 |
|
|
public int getSplitWidth(); |
43 |
|
|
} |