rice.pastry.wire
Class WireNodeHandlePool

java.lang.Object
  extended byrice.pastry.dist.DistNodeHandlePool
      extended byrice.pastry.wire.WireNodeHandlePool

public class WireNodeHandlePool
extends DistNodeHandlePool

The WireNodeHandlePool controls all of the node handles in use by the WirePastryNode. It ensures that there is only one node handle for each respective pastry node.


Constructor Summary
WireNodeHandlePool(WirePastryNode spn)
          Constructor.
 
Method Summary
 DistNodeHandle coalesce(DistNodeHandle han)
          The method verifies a WireNodeHandle.
 WireNodeHandle get(NodeId nodeId)
          Looks up the WireNodeHandle given a NodeId
 void notifyKilled()
          tells all the WireNodeHandles they have been killed.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WireNodeHandlePool

public WireNodeHandlePool(WirePastryNode spn)
Constructor.

Parameters:
spn - The WirePastryNode this pool will serve.
Method Detail

get

public WireNodeHandle get(NodeId nodeId)
Looks up the WireNodeHandle given a NodeId

Parameters:
nodeId - the nodeId you want a Handle for
Returns:
the handle you requested

notifyKilled

public void notifyKilled()
tells all the WireNodeHandles they have been killed.


coalesce

public DistNodeHandle coalesce(DistNodeHandle han)
The method verifies a WireNodeHandle. If a node handle to the pastry node has never been seen before, an entry is added, and this node handle is referred to in the future. Otherwise, this method returns the previously verified node handle to the pastry node.

Specified by:
coalesce in class DistNodeHandlePool
Parameters:
han - DESCRIBE THE PARAMETER
Returns:
The node handle to use to talk to the pastry node.

toString

public java.lang.String toString()





Imprint-Dataprotection