com.nukernel.jdcf
Class AbstractProgram

java.lang.Object
  |
  +--com.nukernel.jdcf.AbstractProgram

public abstract class AbstractProgram
extends java.lang.Object
implements Program

The recommended way to write a program is by extending this class. Code which does not extend this class is not guaranteed to work across releases. If you implement program directly, you assume responsiblity for handing Cluster objects, and the like.

See Also:
Serialized Form

Field Summary
protected  Cluster cluster
           
 
Constructor Summary
AbstractProgram()
           
 
Method Summary
 Communicator getCommunicator()
          Allocate and return an object for use in communicating between nodes and to inject control into the system from external sources.
 void initJob()
          Perform any global initialisation needed by the program.
 void initNode(java.lang.String[] args)
          Perform node-specific initialisation prior to actually starting the program on that node.
 void initSys(Cluster cluster)
          Perform system-specific initialisation prior to running any other code on the compute node.
 void kill()
          Permanently stop executing a job.
 java.lang.String name()
          Get the name of the program.
 void resume()
          Resume executing a previously suspended job.
 void suspend()
          Temporarily halt execution of the job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cluster

protected Cluster cluster
Constructor Detail

AbstractProgram

public AbstractProgram()
Method Detail

name

public java.lang.String name()
Description copied from interface: Program
Get the name of the program.
Specified by:
name in interface Program
Tags copied from interface: Program
Returns:
name of the program

initJob

public void initJob()
Description copied from interface: Program
Perform any global initialisation needed by the program. This method is not guaranteed to run on a compute node used in running the job.
Specified by:
initJob in interface Program

initSys

public final void initSys(Cluster cluster)
Description copied from interface: Program
Perform system-specific initialisation prior to running any other code on the compute node.
Specified by:
initSys in interface Program
Tags copied from interface: Program
Parameters:
cluster - a Cluster object

initNode

public void initNode(java.lang.String[] args)
Description copied from interface: Program
Perform node-specific initialisation prior to actually starting the program on that node.
Specified by:
initNode in interface Program
Tags copied from interface: Program
Parameters:
args - the argument list passed to the job by the front end

getCommunicator

public Communicator getCommunicator()
Description copied from interface: Program
Allocate and return an object for use in communicating between nodes and to inject control into the system from external sources.
Specified by:
getCommunicator in interface Program
Tags copied from interface: Program
Returns:
a remote object for communication

suspend

public void suspend()
Description copied from interface: Program
Temporarily halt execution of the job.
Specified by:
suspend in interface Program

resume

public void resume()
Description copied from interface: Program
Resume executing a previously suspended job.
Specified by:
resume in interface Program

kill

public void kill()
Description copied from interface: Program
Permanently stop executing a job. The job's run method should exit.
Specified by:
kill in interface Program

Java Distributed
Computational
Framework v0.1

Copyright © 2000 Sidney Cammeresi. All rights reserved.