public class FolderBasedDistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>> extends java.lang.Object implements DistributedSearchCommunicationLayer<T,A,V>
| Constructor and Description |
|---|
FolderBasedDistributedSearchCommunicationLayer(java.nio.file.Path communicationFolder,
boolean isMaster) |
| Modifier and Type | Method and Description |
|---|---|
void |
attachCoworker(java.lang.String coworker) |
void |
close() |
void |
createNewJobForCoworker(java.lang.String coworkerId,
java.util.Collection<Node<T,V>> nodesToBeSolved) |
void |
detachCoworker(java.lang.String coworker) |
java.util.Collection<java.lang.String> |
detectNewCoworkers() |
SerializableGraphGenerator<T,A> |
getGraphGenerator() |
INodeEvaluator<T,V> |
getNodeEvaluator() |
void |
init() |
boolean |
isAttached(java.lang.String coworker) |
java.util.Collection<Node<T,V>> |
nextJob(java.lang.String coworker) |
DistributedComputationResult<T,V> |
readResult(java.lang.String coworker) |
void |
register(java.lang.String coworker)
Coworker Stuff
|
void |
reportResult(java.lang.String coworker,
DistributedComputationResult<T,V> result) |
void |
setGraphGenerator(SerializableGraphGenerator<T,A> generator) |
void |
setNodeEvaluator(SerializableNodeEvaluator<T,V> evaluator) |
void |
unregister(java.lang.String coworker) |
public FolderBasedDistributedSearchCommunicationLayer(java.nio.file.Path communicationFolder,
boolean isMaster)
public void init()
public java.util.Collection<java.lang.String> detectNewCoworkers()
detectNewCoworkers in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>public void detachCoworker(java.lang.String coworker)
detachCoworker in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>public void createNewJobForCoworker(java.lang.String coworkerId,
java.util.Collection<Node<T,V>> nodesToBeSolved)
createNewJobForCoworker in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>public DistributedComputationResult<T,V> readResult(java.lang.String coworker)
readResult in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>public void register(java.lang.String coworker)
throws java.lang.InterruptedException
public void unregister(java.lang.String coworker)
unregister in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>public java.util.Collection<Node<T,V>> nextJob(java.lang.String coworker) throws java.lang.InterruptedException
public void reportResult(java.lang.String coworker,
DistributedComputationResult<T,V> result)
reportResult in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>public void attachCoworker(java.lang.String coworker)
attachCoworker in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>public boolean isAttached(java.lang.String coworker)
isAttached in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>public void setGraphGenerator(SerializableGraphGenerator<T,A> generator) throws java.lang.Exception
setGraphGenerator in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>java.lang.Exceptionpublic void setNodeEvaluator(SerializableNodeEvaluator<T,V> evaluator) throws java.lang.Exception
setNodeEvaluator in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>java.lang.Exceptionpublic SerializableGraphGenerator<T,A> getGraphGenerator() throws java.lang.Exception
getGraphGenerator in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>java.lang.Exceptionpublic INodeEvaluator<T,V> getNodeEvaluator() throws java.lang.Exception
getNodeEvaluator in interface DistributedSearchCommunicationLayer<T,A,V extends java.lang.Comparable<V>>java.lang.Exception