org.planx.routing.kademlia.operation
Class NodeLookupOperation
java.lang.Object
org.planx.routing.kademlia.operation.AbstractNodeLookupOperation<List<Node>>
org.planx.routing.kademlia.operation.NodeLookupOperation
- All Implemented Interfaces:
- Operation<List<Node>>, Receiver
public class NodeLookupOperation
- extends AbstractNodeLookupOperation<List<Node>>
- implements Operation<List<Node>>, Receiver
Finds the K closest nodes to a specified identifier.
The algorithm terminates when the operation has gotten responses from the
K closest nodes it has seen. Nodes that fail to respond are
removed from consideration.
- Author:
- Thomas Ambus
|
Method Summary |
List<Node> |
execute()
Starts the operation and returns when the operation is finished. |
NodeLookupOperation
public NodeLookupOperation(Configuration conf,
MessageServer server,
Space space,
Node local,
Identifier id)
- Create a NodeLookupOperation for the specified
id.
execute
public List<Node> execute()
throws IOException,
RoutingException
- Description copied from interface:
Operation
- Starts the operation and returns when the operation is finished.
- Specified by:
execute in interface Operation<List<Node>>- Specified by:
execute in class AbstractNodeLookupOperation<List<Node>>
- Returns:
- A List containing the K closest nodes to the id provided
in the constructor.
- Throws:
RoutingException - If the lookup operation timed out
IOException - If a network error occurred
Copyright © 2004-2005 Plan-X. All Rights Reserved.