|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScribePolicy
Nested Class Summary | |
---|---|
static class |
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. |
static class |
ScribePolicy.LimitedScribePolicy
An optional policy for Scribe, which allows up to a specified number of children per topic. |
Method Summary | |
---|---|
boolean |
allowSubscribe(SubscribeMessage message,
ScribeClient[] clients,
NodeHandle[] children)
This method is called when the newChild is about to become our child, and the policy should return whether or not the child should be allowed to become our child. |
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)
This method is called when an anycast is received which is not satisfied at the local node. |
Method Detail |
---|
boolean allowSubscribe(SubscribeMessage message, ScribeClient[] clients, NodeHandle[] children)
message
- The subscribe message in questionchildren
- The list of children who are currently subscribed to this topicclients
- The list of clients are are currently subscribed to this topic
void directAnycast(AnycastMessage message, NodeHandle parent, NodeHandle[] children)
message
- The anycast message in questionparent
- Our current parent for this message's topicchildren
- Our current children for this message's topicvoid childAdded(Topic topic, NodeHandle child)
topic
- The topic to unsubscribe fromchild
- The child that was addedvoid childRemoved(Topic topic, NodeHandle child)
topic
- 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 |