|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScribeMaintenancePolicy
Nested Class Summary | |
---|---|
static class |
ScribeMaintenancePolicy.DefaultScribeMaintenancePolicy
|
Method Summary | |
---|---|
void |
doMaintenance(MaintainableScribe scribe)
Called periodically. |
RawScribeContent |
implicitSubscribe(java.util.List<Topic> topics)
Called when subscribing for maintenance or tree rearrangement (such as parent death). |
void |
nodeFaulty(MaintainableScribe scribe,
NodeHandle node,
java.util.List<Topic> nodeWasParent,
java.util.List<Topic> nodeWasChild)
When anyone in any Topic (child or parent) is detected faulty. |
void |
noLongerRoot(MaintainableScribe scribe,
java.util.List<Topic> topics)
Called when membership changes "near" the local node, in overlay space. |
void |
subscribeFailed(MaintainableScribe scribe,
java.util.List<Topic> failedTopics)
The subscription failed. |
Method Detail |
---|
void doMaintenance(MaintainableScribe scribe)
void noLongerRoot(MaintainableScribe scribe, java.util.List<Topic> topics)
for (Topic topic : topics) { scribe.subscribe(topic); }Note however that this approach can cause a long tail at the head of the tree.
handle
- membership
- void nodeFaulty(MaintainableScribe scribe, NodeHandle node, java.util.List<Topic> nodeWasParent, java.util.List<Topic> nodeWasChild)
for (Topic topic : nodeWasParent) { if (!isRoot(topic)) { scribe.subscribe(topic); } }
void subscribeFailed(MaintainableScribe scribe, java.util.List<Topic> failedTopics)
failedTopics
- RawScribeContent implicitSubscribe(java.util.List<Topic> topics)
topics
- the topics we are implicitly subscribing to
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |