com.sun.sgs.impl.service.nodemap.affinity.dlpa
Interface LPAServer

All Superinterfaces:
Remote
All Known Implementing Classes:
LabelPropagationServer

public interface LPAServer
extends Remote

The label propagation algorithm server. These methods can all be called by LPA client nodes.


Method Summary
 void finishedIteration(long nodeId, boolean converged, boolean failed, int iteration)
          Indicates that the given nodeId has completed an iteration of the label propagation algorithm.
 LPAClient getLPAClientProxy(long nodeId)
          Returns the LPAClient for the given nodeId.
 void readyToBegin(long nodeId, boolean failed)
          Indicates that the given nodeId is ready to begin the label propagation algorithm.
 void register(long nodeId, LPAClient client)
          Registers a proxy for the node.
 

Method Detail

readyToBegin

void readyToBegin(long nodeId,
                  boolean failed)
                  throws IOException
Indicates that the given nodeId is ready to begin the label propagation algorithm.

Parameters:
nodeId - the node that is ready to begin
failed - true if there was a problem while setting up
Throws:
IOException - if there is a communication problem

finishedIteration

void finishedIteration(long nodeId,
                       boolean converged,
                       boolean failed,
                       int iteration)
                       throws IOException
Indicates that the given nodeId has completed an iteration of the label propagation algorithm.

Parameters:
nodeId - the node that has finished an iteration
converged - true if the node believes the algorithm has converged and can be stopped
failed - true if there was a problem while running
iteration - the iteration that has finished
Throws:
IOException - if there is a communication problem

register

void register(long nodeId,
              LPAClient client)
              throws IOException
Registers a proxy for the node. If a client has already been registered for the node, it is replaced.

Parameters:
nodeId - the node the proxy represents
client - the client proxy, which this server and other nodes can call
Throws:
IOException - if there is a communication problem

getLPAClientProxy

LPAClient getLPAClientProxy(long nodeId)
                            throws IOException
Returns the LPAClient for the given nodeId. If null is returned, the node should be considered failed.

Parameters:
nodeId - the node we need the proxy for
Returns:
the LPA client proxy for the given node, or null if the node has failed
Throws:
IOException - if there is a communication problem

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved