|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.routing.operation.Operation
org.planx.xmlstore.routing.operation.NodeLookupOperation
public class NodeLookupOperation
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.
| Field Summary | |
|---|---|
protected Configuration |
conf
|
protected boolean |
error
|
protected Identifier |
id
|
protected Node |
local
|
protected LookupMessage |
lookupMessage
Message sent to each peer. |
protected MessageServer |
server
|
protected Space |
space
|
| Constructor Summary | |
|---|---|
NodeLookupOperation(Configuration conf,
MessageServer server,
Space space,
Node local,
Identifier id)
Create a NodeLookupOperation for the specified id. |
|
| Method Summary | |
|---|---|
Object |
execute()
Starts the operation and returns when the operation is finished. |
void |
receive(Message incoming,
int comm)
Receives an incoming NodeReplyMessage. |
void |
timeout(int comm)
A node does not respond or a packet was lost. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Configuration conf
protected MessageServer server
protected Space space
protected Node local
protected Identifier id
protected boolean error
protected LookupMessage lookupMessage
| Constructor Detail |
|---|
public NodeLookupOperation(Configuration conf,
MessageServer server,
Space space,
Node local,
Identifier id)
id.
| Method Detail |
|---|
public Object execute()
throws IOException,
RoutingException
Operation
execute in class OperationRoutingException - If the lookup operation timed out
IOException - If a network error occurred
public void receive(Message incoming,
int comm)
throws IOException
receive in interface ReceiverIOException - if an I/O error occurs
public void timeout(int comm)
throws IOException
timeout in interface ReceiverIOException - if an I/O error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||