|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectrice.p2p.scribe.ScribePolicy.DefaultScribePolicy
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.
| Nested Class Summary |
| Nested classes inherited from class rice.p2p.scribe.ScribePolicy |
ScribePolicy.DefaultScribePolicy, ScribePolicy.LimitedScribePolicy |
| Field Summary | |
protected Environment |
environment
DESCRIBE THE FIELD |
| Constructor Summary | |
ScribePolicy.DefaultScribePolicy(Environment env)
Constructor for DefaultScribePolicy. |
|
| Method Summary | |
boolean |
allowSubscribe(SubscribeMessage message,
ScribeClient[] clients,
NodeHandle[] children)
This method always return true; |
void |
childAdded(Topic topic,
NodeHandle child)
Informs this policy that a child was added to a topic - the topic is free to ignore this upcall if it doesn't care. |
void |
childRemoved(Topic topic,
NodeHandle child)
Informs this policy that a child was removed from a topic - the topic is free to ignore this upcall if it doesn't care. |
void |
directAnycast(AnycastMessage message,
NodeHandle parent,
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 |
| Field Detail |
protected Environment environment
| Constructor Detail |
public ScribePolicy.DefaultScribePolicy(Environment env)
env - DESCRIBE THE PARAMETER| Method Detail |
public boolean allowSubscribe(SubscribeMessage message,
ScribeClient[] clients,
NodeHandle[] children)
allowSubscribe in interface ScribePolicymessage - The subscribe message in questionchildren - The list of children who are currently subscribedclients - The list of clients are are currently subscribed
public void directAnycast(AnycastMessage message,
NodeHandle parent,
NodeHandle[] children)
directAnycast in interface ScribePolicymessage - The anycast message in questionparent - Our current parent for this message's topicchildren - Our current children for this message's topic
public void childAdded(Topic topic,
NodeHandle child)
childAdded in interface ScribePolicytopic - The topic to unsubscribe fromchild - The child that was added
public void childRemoved(Topic topic,
NodeHandle child)
childRemoved in interface ScribePolicytopic - The topic to unsubscribe fromchild - The child that was removed
|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||