Class FarmJobRunnable
- java.lang.Object
-
- org.biojava.nbio.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
-
-
Constructor Summary
Constructors Constructor Description FarmJobRunnable(FarmJobParameters params)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAlignmentProgressListener(AlignmentProgressListener listener)
String
alignPair(String name1, String name2)
String
alignPair(String name1, String name2, String algorithmName)
void
clearListeners()
protected PdbPairsMessage
getAlignmentPairsFromServer()
talk to centralized server and fetch all alignments to run.protected static String
getRandomUsername()
boolean
isWaitForAlignments()
void
run()
protected void
sendResultsToServer(List<String> results)
void
setWaitForAlignments(boolean waitForAlignments)
void
terminate()
Send signal to terminate calculations
-
-
-
Constructor Detail
-
FarmJobRunnable
public FarmJobRunnable(FarmJobParameters params)
-
-
Method Detail
-
addAlignmentProgressListener
public void addAlignmentProgressListener(AlignmentProgressListener listener)
-
clearListeners
public void clearListeners()
-
getRandomUsername
protected static String getRandomUsername()
-
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)
-
-