|
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.maintenance.ScribeMaintenancePolicy.DefaultScribeMaintenancePolicy
public static class ScribeMaintenancePolicy.DefaultScribeMaintenancePolicy
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface rice.p2p.scribe.maintenance.ScribeMaintenancePolicy |
---|
ScribeMaintenancePolicy.DefaultScribeMaintenancePolicy |
Constructor Summary | |
---|---|
ScribeMaintenancePolicy.DefaultScribeMaintenancePolicy(Environment environment)
|
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 handle,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScribeMaintenancePolicy.DefaultScribeMaintenancePolicy(Environment environment)
Method Detail |
---|
public void doMaintenance(MaintainableScribe scribe)
ScribeMaintenancePolicy
doMaintenance
in interface ScribeMaintenancePolicy
public void noLongerRoot(MaintainableScribe scribe, java.util.List<Topic> topics)
ScribeMaintenancePolicy
for (Topic topic : topics) { scribe.subscribe(topic); }Note however that this approach can cause a long tail at the head of the tree.
noLongerRoot
in interface ScribeMaintenancePolicy
public void nodeFaulty(MaintainableScribe scribe, NodeHandle handle, java.util.List<Topic> nodeWasParent, java.util.List<Topic> nodeWasChild)
ScribeMaintenancePolicy
for (Topic topic : nodeWasParent) { if (!isRoot(topic)) { scribe.subscribe(topic); } }
nodeFaulty
in interface ScribeMaintenancePolicy
public void subscribeFailed(MaintainableScribe scribe, java.util.List<Topic> failedTopics)
ScribeMaintenancePolicy
subscribeFailed
in interface ScribeMaintenancePolicy
public RawScribeContent implicitSubscribe(java.util.List<Topic> topics)
implicitSubscribe
in interface ScribeMaintenancePolicy
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 |