org.biojava.bio.structure.align.client
Class FarmJobRunnable
java.lang.Object
org.biojava.bio.structure.align.client.FarmJobRunnable
- All Implemented Interfaces:
- Runnable
public class FarmJobRunnable
- extends Object
- implements Runnable
Contains the single thread for a job that can run multiple alignments.
- Author:
- Andreas Prlic
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FarmJobRunnable
public FarmJobRunnable(FarmJobParameters params)
addAlignmentProgressListener
public void addAlignmentProgressListener(AlignmentProgressListener listener)
clearListeners
public void clearListeners()
getRandomUsername
protected static String getRandomUsername()
log
public static void log(String message)
run
public void run()
- Specified by:
run
in interface Runnable
alignPair
public String alignPair(String name1,
String name2)
throws StructureException,
IOException
- Throws:
StructureException
IOException
alignPair
public String alignPair(String name1,
String name2,
String algorithmName)
throws StructureException,
IOException
- Throws:
StructureException
IOException
getAlignmentPairsFromServer
protected PdbPairsMessage getAlignmentPairsFromServer()
- talk to centralized server and fetch all alignments to run.
- Returns:
- a list of pairs to align.
sendResultsToServer
protected void sendResultsToServer(List<String> results)
terminate
public void terminate()
- Send signal to terminate calculations
isWaitForAlignments
public boolean isWaitForAlignments()
setWaitForAlignments
public void setWaitForAlignments(boolean waitForAlignments)