zeta
Class WorkUnitManager
java.lang.Object
|
+--zeta.WorkUnitManager
- public class WorkUnitManager
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
properties
private ZetaProperties properties
- Contains a persistent set of the ZetaGrid properties.
task
private Task task
possibleWorkUnits
private java.util.Set possibleWorkUnits
activeWorkUnits
private java.util.Set activeWorkUnits
storeWorkUnits
private java.util.Set storeWorkUnits
offline
private boolean offline
completedLocalWorkUnits
private int completedLocalWorkUnits
exitAfterWorkUnits
private int exitAfterWorkUnits
exitAfterWorkUnitsActive
private boolean exitAfterWorkUnitsActive
wait
private int wait
WorkUnitManager
public WorkUnitManager(Task task)
getWorkUnit
public WorkUnit getWorkUnit()
submit
public void submit(WorkUnit workUnit,
boolean exitAfterTransfer,
boolean outputExceptions)
storeData
private boolean storeData(WorkUnit workUnit,
boolean outputExceptions)
storeCompletedWorkUnits
private int storeCompletedWorkUnits(boolean outputExceptions)
- Returns:
- number of completed work units which are stored successfully at the server, -1 if an error occurs and no work unit is stored
requestNewWorkUnits
private boolean requestNewWorkUnits()
getNumberOfActiveWorkUnits
private int getNumberOfActiveWorkUnits()
numberOfLocalWorkUnits
private int numberOfLocalWorkUnits(long notOlderThanMillis)
- Returns:
- 0 if all local work units are older than the specified time.
numberOfCompletedLocalWorkUnits
private int numberOfCompletedLocalWorkUnits()
cleanWorkUnits
private void cleanWorkUnits(java.util.List workUnitFiles)
- Deletes local work unit files.
A log file will only be deleted if it is inside the specified list and the last modified timestamp is older than one day
or the result file for the same completed work unit as the log file does not exist.
Deletes all result files which work unit has no log file.
- Parameters:
workUnitFiles - list of work unit logfile names which can be deleted
checkAvailDiskSpace
private boolean checkAvailDiskSpace(java.lang.String src,
java.io.File dest)
throws java.io.IOException
java.io.IOException
retrievePossibleWorkUnits
private void retrievePossibleWorkUnits()
storePossibleWorkUnits
private void storePossibleWorkUnits(java.io.BufferedReader workUnits)
getKey
private java.lang.String getKey()
- Returns a unique key of this computer.
- Returns:
- a unique key of this computer.
For further technical papers, see ZetaGrid Technical Documentation.
Copyright © 2001,2002 Sebastian Wedeniwski. All Rights Reserved.