tapestry.impl
Class WatchList

java.lang.Object
  |
  +--tapestry.impl.WatchList
All Implemented Interfaces:
QuickSerializable

public class WatchList
extends Object
implements QuickSerializable


Constructor Summary
WatchList(InputBuffer buffer)
           
WatchList(SecureHash guid, int start, int lvls)
           
 
Method Summary
 TreeSet checkAndSend(SecureHash newGuid, RoutingTable table)
          HashSet checkAndSend This function is called as part of the acknowledged multicast handler.
 SecureHash getGuid()
           
 int levels()
           
 void prune()
          void prune Function that checks the lower levels of the watchlist, and removes levels which have all been filled in, in order to minimize the size of the watchlist sent along with the multicast
 void serialize(OutputBuffer buffer)
           
 int startLevel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WatchList

public WatchList(SecureHash guid,
                 int start,
                 int lvls)

WatchList

public WatchList(InputBuffer buffer)
          throws QSException
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Specified by:
serialize in interface QuickSerializable

getGuid

public SecureHash getGuid()

startLevel

public int startLevel()

levels

public int levels()

checkAndSend

public TreeSet checkAndSend(SecureHash newGuid,
                            RoutingTable table)
HashSet checkAndSend This function is called as part of the acknowledged multicast handler. It checks to see if the routing table of the current node contains any entries that can fill holes in the current watchlist. The function returns a linkedlist of guids which can fill holes, or null if there is none. The actual bits are turned ON in the watchlist bitmap as a side-effect. So when this same watchlist object is passed on, it has been updated to reflect the presence of this current node.

Parameters:
newGuid -
table -
Returns:
HashSet of nodes that need to be notified.

prune

public void prune()
void prune Function that checks the lower levels of the watchlist, and removes levels which have all been filled in, in order to minimize the size of the watchlist sent along with the multicast