oogp2p.pastry
Class PastryAdministrator

java.lang.Object
  extended byoogp2p.pastry.PastryAdministrator

public class PastryAdministrator
extends java.lang.Object

Author:
sjg To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
(package private)  ClientAdministrator clAdmin
           
private  PastryFileNode myFileNode
           
private  boolean myJoined
           
private  PastryNode myNode
           
private  boolean myValidFlag
           
 
Constructor Summary
PastryAdministrator()
           
 
Method Summary
 void addLocation(PastryLocation pLoc)
          If adding multiple PastryLocations at once, put them into an array and use the other addLocation(..) function for efficiency.
 void addLocation(PastryLocation[] pLocs)
           
 void create()
           
 PastryFileNode getFileNode()
           
 PastryLocation getLocation()
           
 PastryNode getNode()
           
 boolean isJoined()
           
(package private)  boolean isValid()
           
 void join(PastryLocation pl)
           
 boolean mergeLeafset(LeafSet theLeafSet, PastryLocation leafSetSender)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myNode

private PastryNode myNode

myFileNode

private PastryFileNode myFileNode

myJoined

private boolean myJoined

myValidFlag

private boolean myValidFlag

clAdmin

ClientAdministrator clAdmin
Constructor Detail

PastryAdministrator

public PastryAdministrator()
Method Detail

join

public void join(PastryLocation pl)

create

public void create()

isValid

boolean isValid()

getNode

public PastryNode getNode()

isJoined

public boolean isJoined()
Returns:

addLocation

public void addLocation(PastryLocation[] pLocs)

addLocation

public void addLocation(PastryLocation pLoc)
If adding multiple PastryLocations at once, put them into an array and use the other addLocation(..) function for efficiency.

Parameters:
pLoc - -- pastry location to add

getLocation

public PastryLocation getLocation()

getFileNode

public PastryFileNode getFileNode()
Returns:
-- the pastry file node object

mergeLeafset

public boolean mergeLeafset(LeafSet theLeafSet,
                            PastryLocation leafSetSender)
Parameters:
theLeafSet -
leafSetSender -
Returns:
-- whether the leafset changed or not