appl.parallel.data.xulugridfile
Class XuluGridSharedFileSystemLoader

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

public class XuluGridSharedFileSystemLoader
extends AbstractDataHandler

This is a loader for use with shared file systems like ocfs2 or gfs. It only works in conjunction with the XuluWritableGridFile and supports loading data from and into this file format. That means reading and writing is done directly into the file. The Xulu GUI won't notice changes if you do not reload the XuluWritableGrid!

Author:
Dominik Appl
See Also:
XuluGridFile, XuluWritableGridFile, PartitionDataHandler, Serialized Form

Field Summary
 
Fields inherited from class appl.parallel.data.AbstractDataHandler
data, LOG, partitionBounds, rootID, spmdClient, unloadBounds
 
Constructor Summary
XuluGridSharedFileSystemLoader()
          Used for deserialization.
XuluGridSharedFileSystemLoader(int rootID, ClientDataServer client, Rectangle partitionBounds, Rectangle unloadBounds)
          constructs a new XuluGridSharedFileSystemLoader.
 
Method Summary
 PartitionDataHandler clone()
           
 String getLoadInfo()
           
 String getUnloadInfo()
           
 DataPartition load()
          loads the data directly from the gridfile
 PartitionDataHandler newInstance(int rootID, ClientDataServer client, Rectangle partitionBounds, Rectangle unloadBounds)
           
 void unload()
          unloads into the file!
 
Methods inherited from class appl.parallel.data.AbstractDataHandler
setBasePartition, setRootID, setSPMDClient, setUnloadBounds
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XuluGridSharedFileSystemLoader

public XuluGridSharedFileSystemLoader(int rootID,
                                      ClientDataServer client,
                                      Rectangle partitionBounds,
                                      Rectangle unloadBounds)
constructs a new XuluGridSharedFileSystemLoader.

Parameters:
rootID - the id of the data
client - a spmd client which may be used to get metainformation on client side before transfering the loader to its destination
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 (may only be the calculation area)

XuluGridSharedFileSystemLoader

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

Method Detail

newInstance

public PartitionDataHandler newInstance(int rootID,
                                        ClientDataServer client,
                                        Rectangle partitionBounds,
                                        Rectangle unloadBounds)
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
loads the data directly from the gridfile

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
See Also:
AbstractDataHandler.load()

unload

public void unload()
unloads into the file! not into the Xulu-Client or anything!

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

clone

public PartitionDataHandler clone()
Specified by:
clone in interface PartitionDataHandler
Overrides:
clone in class AbstractDataHandler