|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.pastry.client.PastryAppl rice.pastry.pns.PNSApplication rice.pastry.socket.nat.rendezvous.RendezvousPNSApplication
public class RendezvousPNSApplication
Does not try to connect to NATted nodes during PNS. TODO: Cull out firewalled nodes from return values TODO: Make Proximity of firewalled nodes MAX_VALUE TODO: Make Rendezvous Layer check the MultiInetSocketAddress to see if they can contact eachother directly
Field Summary |
---|
Fields inherited from class rice.pastry.pns.PNSApplication |
---|
DEFAULT_PROXIMITY, environment, pingCache, rtBase, timer |
Fields inherited from class rice.pastry.client.PastryAppl |
---|
address, deserializer, instance, logger, options, receiver, thePastryNode |
Constructor Summary | |
---|---|
RendezvousPNSApplication(PastryNode pn,
ContactDirectStrategy<RendezvousSocketNodeHandle> contactDirectStrategy)
|
Method Summary | |
---|---|
Cancellable |
getLeafSet(NodeHandle input,
Continuation<LeafSet,java.lang.Exception> c)
This method returns the remote leafset of the provided handle to the caller, in a protocol-dependent fashion. |
Cancellable |
getNearest(NodeHandle seed,
Continuation<java.util.Collection<NodeHandle>,java.lang.Exception> retToMe)
This method implements the algorithm in the Pastry locality paper for finding a close node the the current node through iterative leafset and route row requests. |
Cancellable |
getNearHandles(java.util.Collection<NodeHandle> bootHandles,
Continuation<java.util.Collection<NodeHandle>,java.lang.Exception> deliverResultToMe)
This is the first step, cull out the bootHandles that we can't use good. |
protected java.util.List<NodeHandle> |
getNearHandlesHelper(java.util.List<NodeHandle> handles)
Don't return any non-contactDirect handles unless all of them are. |
Cancellable |
getProximity(NodeHandle handle,
Continuation<java.lang.Integer,java.io.IOException> c,
int timeout)
Non-blocking version, no timeout. |
Cancellable |
getRouteRow(NodeHandle input,
short row,
Continuation<RouteSet[],java.lang.Exception> c)
Non-blocking version. |
protected boolean |
ignore(NodeHandle handle,
Continuation c)
This method decides who to bother trying to connect to. |
protected boolean |
useHandle(NodeHandle handle)
Separate this out to make it super easy to change the policy. |
Methods inherited from class rice.pastry.pns.PNSApplication |
---|
addToWaitingForLeafSet, addToWaitingForRouteRow, deliverWhenNotReady, messageForAppl, proximityChanged, removeFromWaitingForLeafSet, removeFromWaitingForRouteRow, sortedProximityCache |
Methods inherited from class rice.pastry.client.PastryAppl |
---|
accept, canReceiveSocket, connect, destroy, enrouteMessage, finishReceiveSocket, getAddress, getDeserializer, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, leafSetChange, notifyReady, receiveMessage, receiveMessageInternal, register, routeMsg, routeMsg, routeMsgDirect, routeSetChange, setDeserializer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RendezvousPNSApplication(PastryNode pn, ContactDirectStrategy<RendezvousSocketNodeHandle> contactDirectStrategy)
Method Detail |
---|
protected boolean ignore(NodeHandle handle, Continuation c)
handle
- c
-
protected boolean useHandle(NodeHandle handle)
handle
-
protected java.util.List<NodeHandle> getNearHandlesHelper(java.util.List<NodeHandle> handles)
getNearHandlesHelper
in class PNSApplication
public Cancellable getNearHandles(java.util.Collection<NodeHandle> bootHandles, Continuation<java.util.Collection<NodeHandle>,java.lang.Exception> deliverResultToMe)
getNearHandles
in interface ProximityNeighborSelector
getNearHandles
in class PNSApplication
public Cancellable getLeafSet(NodeHandle input, Continuation<LeafSet,java.lang.Exception> c)
PNSApplication
getLeafSet
in class PNSApplication
input
- The node to connect toc
- Continuation to return the LeafSet to
public Cancellable getRouteRow(NodeHandle input, short row, Continuation<RouteSet[],java.lang.Exception> c)
PNSApplication
getRouteRow
in class PNSApplication
public Cancellable getNearest(NodeHandle seed, Continuation<java.util.Collection<NodeHandle>,java.lang.Exception> retToMe)
PNSApplication
getNearest
in class PNSApplication
seed
- Any member of the pastry ring
public Cancellable getProximity(NodeHandle handle, Continuation<java.lang.Integer,java.io.IOException> c, int timeout)
PNSApplication
getProximity
in class PNSApplication
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |