rice.pastry.wire
Class WirePastryNodeFactory
- public class WirePastryNodeFactory
- extends rice.pastry.dist.DistPastryNodeFactory
- Pastry node factory for Wire-linked nodes.
- Version:
- $Id: WirePastryNodeFactory.java,v 1.12 2002/09/13 03:23:56 amislove Exp $
- Author:
- Alan Mislove
leafSetMaintFreq
private static final int leafSetMaintFreq
- Large period (in seconds) means infrequent, 0 means never.
WirePastryNodeFactory
public WirePastryNodeFactory(rice.pastry.NodeIdFactory nf,
int startPort)
- Constructor.
- Parameters:
p
- RMI registry port.
generateNodeHandle
public rice.pastry.NodeHandle generateNodeHandle(java.net.InetSocketAddress address)
- Method which contructs a node handle (using the wire protocol) for the node at address NodeHandle.
- Parameters:
address
- The address of the remote node.
- Returns:
- A NodeHandle cooresponding to that address
newNode
public rice.pastry.PastryNode newNode(rice.pastry.NodeHandle bootstrap)
- Method which creates a Pastry node from the next port with a randomly generated NodeId.
- Parameters:
bootstrap
- Node handle to bootstrap from.
- Returns:
- A node with a random ID and next port number.
getAddress
private java.net.InetSocketAddress getAddress(int portNumber)
- Method which constructs an InetSocketAddres for the local host with the specifed port number.
- Parameters:
portNumber
- The port number to create the address at.
- Returns:
- An InetSocketAddress at the localhost with port portNumber.