rice.p2p.scribe
Class ScribePolicy.DefaultScribePolicy
java.lang.Object
|
+--rice.p2p.scribe.ScribePolicy.DefaultScribePolicy
- All Implemented Interfaces:
- ScribePolicy
- Direct Known Subclasses:
- ScribePolicy.LimitedScribePolicy, ScribeRegrTest.TestScribePolicy
- Enclosing class:
- ScribePolicy
- public static class ScribePolicy.DefaultScribePolicy
- extends java.lang.Object
- implements ScribePolicy
The default policy for Scribe, which always allows new children to join and adds children in
the order in which they are provided, implicitly providing a depth-first search.
- Version:
- $Id: ScribePolicy.java,v 1.1 2003/09/28 08:16:29 amislove Exp $
- Author:
- amislove
Method Summary |
boolean |
allowSubscribe(rice.p2p.scribe.messaging.SubscribeMessage message,
rice.p2p.scribe.ScribeClient[] clients,
rice.p2p.commonapi.NodeHandle[] children)
This method always return true; |
void |
directAnycast(rice.p2p.scribe.messaging.AnycastMessage message,
rice.p2p.commonapi.NodeHandle parent,
rice.p2p.commonapi.NodeHandle[] children)
Simply adds the parent and children in order, which implements a depth-first-search. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScribePolicy.DefaultScribePolicy
public ScribePolicy.DefaultScribePolicy()
allowSubscribe
public boolean allowSubscribe(rice.p2p.scribe.messaging.SubscribeMessage message,
rice.p2p.scribe.ScribeClient[] clients,
rice.p2p.commonapi.NodeHandle[] children)
- This method always return true;
- Specified by:
allowSubscribe
in interface ScribePolicy
- Parameters:
message
- The subscribe message in questionchildren
- The list of children who are currently subscribedclients
- The list of clients are are currently subscribed
- Returns:
- True.
directAnycast
public void directAnycast(rice.p2p.scribe.messaging.AnycastMessage message,
rice.p2p.commonapi.NodeHandle parent,
rice.p2p.commonapi.NodeHandle[] children)
- Simply adds the parent and children in order, which implements a depth-first-search.
- Specified by:
directAnycast
in interface ScribePolicy
- Parameters:
message
- The anycast message in questionparent
- Our current parent for this message's topicchildren
- Our current children for this message's topic
Copyright © 2001 - Rice Pastry.