|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.p2p.scribe.ScribePolicy.DefaultScribePolicy rice.p2p.scribe.ScribePolicy.LimitedScribePolicy
An optional policy for Scribe, which allows up to a specified number of children per topic.
Nested Class Summary |
Nested classes inherited from class rice.p2p.scribe.ScribePolicy |
ScribePolicy.DefaultScribePolicy, ScribePolicy.LimitedScribePolicy |
Field Summary | |
protected int |
maxChildren
The number of children to allow per topic |
Fields inherited from class rice.p2p.scribe.ScribePolicy.DefaultScribePolicy |
environment |
Constructor Summary | |
ScribePolicy.LimitedScribePolicy(int max,
Environment env)
Construtor which takes a maximum number |
Method Summary | |
boolean |
allowSubscribe(SubscribeMessage message,
ScribeClient[] clients,
NodeHandle[] children)
This method returns (children.length < maxChildren-1); |
Methods inherited from class rice.p2p.scribe.ScribePolicy.DefaultScribePolicy |
childAdded, childRemoved, directAnycast |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int maxChildren
Constructor Detail |
public ScribePolicy.LimitedScribePolicy(int max, Environment env)
max
- The maximum number of childrenenv
- DESCRIBE THE PARAMETERMethod Detail |
public boolean allowSubscribe(SubscribeMessage message, ScribeClient[] clients, NodeHandle[] children)
allowSubscribe
in interface ScribePolicy
allowSubscribe
in class ScribePolicy.DefaultScribePolicy
message
- The subscribe message in questionchildren
- The list of children who are currently subscribedclients
- The list of clients are are currently subscribed
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |