|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectappl.parallel.data.AbstractDataHandler
public abstract class AbstractDataHandler
This class is used as a base class for loaders. It is especially intended for
use with the SPMD-Paradigm, but may be used with other loaders, too. It
implements the reusable stuff of the PartitionDataHandler
Interface.
Notice that each loader is responsible for exactly one data element. It must
be Cloneable
, so that multi-data elements can add another element.
Field Summary | |
---|---|
protected DataPartition |
data
the currently handled data (must be initialized before calling unload() |
protected Logger |
LOG
|
protected Rectangle |
partitionBounds
The partition bounds (the whole bounds) of the current SplittableResource |
protected int |
rootID
The id of the currently handled SplittableResource |
protected ClientDataServer |
spmdClient
A ClientDataServer may be used locally for faster access. |
protected Rectangle |
unloadBounds
The unload bounds differ may differ from the partitionBounds. |
Constructor Summary | |
---|---|
AbstractDataHandler()
(empty constructors are important for deserialization) |
|
AbstractDataHandler(int rootID,
ClientDataServer client,
Rectangle partitionBounds,
Rectangle unloadBounds)
Constructs a new AbstractDataHandler . |
Method Summary | |
---|---|
PartitionDataHandler |
clone()
|
abstract String |
getLoadInfo()
|
abstract String |
getUnloadInfo()
|
abstract DataPartition |
load()
On invocation the data is loaded and returned |
void |
setBasePartition(DataPartition data)
|
void |
setRootID(int rootID)
|
void |
setSPMDClient(ClientDataServer localSPMDClient)
sets a local ClientDataServer which MAY be used by the handler
for local access |
void |
setUnloadBounds(Rectangle unloadBounds)
sets the bounds of the data to be unloaded so that not all data is unloaded to the destination. |
abstract void |
unload()
unloads the Data to a specific location |
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 |
---|
newInstance |
Field Detail |
---|
protected transient Logger LOG
protected int rootID
SplittableResource
protected Rectangle partitionBounds
SplittableResource
protected transient DataPartition data
unload()
protected Rectangle unloadBounds
protected transient ClientDataServer spmdClient
ClientDataServer
may be used locally for faster access.
Constructor Detail |
---|
public AbstractDataHandler(int rootID, ClientDataServer client, Rectangle partitionBounds, Rectangle unloadBounds)
AbstractDataHandler
. The local IP address at
the time of construction is later used on serverside for communication
(e.g. unloading).
rootID
- the id of the dataclient
- a ClientDataServer
which may be used to get meta
information on client side before transferring the loader to
its destinationpartitionBounds
- the bounds of the partition to be retrieved on server sideunloadBounds
- the bounds of the partition which is to be uploaded to the
client after calculation (may only be the calculation area)public AbstractDataHandler()
AbstractDataHandler(int, ClientDataServer, Rectangle, Rectangle)
Method Detail |
---|
public void setSPMDClient(ClientDataServer localSPMDClient)
ClientDataServer
which MAY be used by the handler
for local access
setSPMDClient
in interface PartitionDataHandler
localSPMDClient
- public abstract String getLoadInfo()
getLoadInfo
in interface DataLoader
public abstract String getUnloadInfo()
getUnloadInfo
in interface DataUnloader
public abstract DataPartition load() throws LoadingException
DataLoader
load
in interface DataLoader
load
in interface PartitionDataHandler
LoadingException
- if for some reason the data could not
be loadedpublic void setUnloadBounds(Rectangle unloadBounds)
PartitionDataHandler
setUnloadBounds
in interface PartitionDataHandler
public void setBasePartition(DataPartition data)
setBasePartition
in interface PartitionDataHandler
public abstract void unload()
DataUnloader
unload
in interface DataUnloader
public void setRootID(int rootID)
setRootID
in interface PartitionDataHandler
public PartitionDataHandler clone()
clone
in interface PartitionDataHandler
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |