|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.util.StandardStage | +--ostore.apps.qtree.impl.QTree
This stage creates and maintains a distributed query tree. Queries are multicasted to every participating node, and results are collected at the declared root of the tree. Applications include: Visualization (Sonar), Availability, All-Pairs-Ping, Dhtb tests, etc.
Nested Class Summary | |
---|---|
protected class |
QTree.ChildrenEvent
|
protected class |
QTree.DeadParent
|
protected class |
QTree.EvalPotParents
|
protected class |
QTree.ParentEvent
|
protected class |
QTree.ProcessCache
|
Field Summary | |
---|---|
static int |
CLOSED
|
protected int |
NUM_RETRIES
|
static int |
OPENING
|
static int |
STABLE
|
protected long |
TIMEOUT_ACK
|
protected long |
TIMEOUT_ADOPT
|
protected long |
TIMEOUT_DELAY
|
protected long |
TIMEOUT_MSG
|
Fields inherited from class ostore.util.StandardStage |
---|
classifier, DEBUG, event_types, inb_msg_types, logger, my_node_id, my_sink, outb_msg_types, resender, resender_tokens, serializable_types, sim_running, tag |
Constructor Summary | |
---|---|
QTree()
|
Method Summary | |
---|---|
protected void |
alterState(QTreeStateMsg msg)
Only root receives a QTreeStateMsg. |
protected void |
chooseParent(QTree.EvalPotParents event)
|
protected void |
closeChild(TreeKey key,
NodeId node)
|
protected void |
closeParent(TreeKey key,
NodeId node)
|
protected void |
considerAdoption(QTreeGroupMsg msg)
|
protected boolean |
contactCandidateOrphan(GuidAddr node,
TreeKey treeKey,
int level,
QSVector path)
|
protected boolean |
findCandidateOrphans(TreeKey treeKey,
int level,
QSVector leaderPath)
|
protected void |
findOrphans(TreeKey treeKey,
QSVector path,
int level)
A wrapper for findCandidateOrphans. |
protected Set |
getChildren(SecureHash treeId)
|
protected Set |
getParents(SecureHash treeId)
|
Set |
getRevpointers(Map revs,
int level)
Copied from Router . |
protected void |
handleAdoptionAck(QTreeGroupMsgAck ack)
|
protected void |
handleAlarm()
Only to be used in conjunction with resender. |
protected void |
handleClose(QTreeCloseMsg msg)
|
protected void |
handleCloseAck(QTreeCloseMsgAck ack)
|
protected void |
handleDeadParent(QTree.DeadParent event)
|
protected void |
handleDown(QTreeDown down)
|
protected void |
handleDownMsg(QTreeDownMsg msg)
|
protected void |
handleDownMsgAck(QTreeDownMsgAck msg)
|
void |
handleEvent(QueueElementIF item)
|
protected void |
handleRepair(QTreeRepairMsg msg)
Sent from the neglected child to the grandparent, then to the grand-grandparent, and so forth. |
protected void |
handleRevPtrsChanged(KbrReverseRoutingTableChanged changes)
|
protected void |
handleRoutingTableChanged(KbrRoutingTableChanged changes)
|
protected void |
handleUp(QTreeUp up)
QTREE.API MESSAGE ROUTING |
protected void |
handleUpMsg(QTreeUpMsg msg)
|
protected void |
handleUpMsgAck(QTreeUpMsgAck msg)
|
void |
init(ConfigDataIF config)
|
protected void |
markClosure(TreeKey key)
Assumption made that key passed in has state CLOSED |
protected boolean |
markStability(TreeKey treeKey)
Assume path, parent, everything but children are established for a given treeKey. |
protected void |
processCache()
processCache clears out expired network messages from the cache. |
int |
profileSize()
|
protected void |
recreateTree(TreeKey key,
GuidAddr parent,
boolean delay,
QSVector path)
|
protected void |
selfRoot(TreeKey treeKey)
|
protected void |
updatePath(TreeKey treeKey,
QSVector path)
|
Methods inherited from class ostore.util.StandardStage |
---|
BUG, BUG, BUG, destroy, dispatch, enqueue, handleEvents, now_ms, now_us |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected long TIMEOUT_ADOPT
protected long TIMEOUT_DELAY
protected long TIMEOUT_ACK
protected long TIMEOUT_MSG
protected int NUM_RETRIES
public static int OPENING
public static int STABLE
public static int CLOSED
Constructor Detail |
public QTree()
Method Detail |
public void handleEvent(QueueElementIF item) throws EventHandlerException
handleEvent
in interface EventHandlerIF
EventHandlerException
protected void processCache()
processCache
clears out expired network messages from the cache.
protected void alterState(QTreeStateMsg msg)
protected void selfRoot(TreeKey treeKey)
protected boolean markStability(TreeKey treeKey)
protected void markClosure(TreeKey key)
protected void updatePath(TreeKey treeKey, QSVector path)
protected void findOrphans(TreeKey treeKey, QSVector path, int level)
protected boolean findCandidateOrphans(TreeKey treeKey, int level, QSVector leaderPath)
protected boolean contactCandidateOrphan(GuidAddr node, TreeKey treeKey, int level, QSVector path)
protected void considerAdoption(QTreeGroupMsg msg)
protected void chooseParent(QTree.EvalPotParents event)
protected void handleAdoptionAck(QTreeGroupMsgAck ack)
protected void closeChild(TreeKey key, NodeId node)
protected void closeParent(TreeKey key, NodeId node)
protected void handleRoutingTableChanged(KbrRoutingTableChanged changes)
protected void handleRevPtrsChanged(KbrReverseRoutingTableChanged changes)
protected void handleRepair(QTreeRepairMsg msg)
protected void recreateTree(TreeKey key, GuidAddr parent, boolean delay, QSVector path)
protected void handleDeadParent(QTree.DeadParent event)
protected void handleClose(QTreeCloseMsg msg)
protected void handleCloseAck(QTreeCloseMsgAck ack)
protected void handleAlarm()
protected void handleUp(QTreeUp up)
protected void handleUpMsg(QTreeUpMsg msg)
protected void handleUpMsgAck(QTreeUpMsgAck msg)
protected void handleDown(QTreeDown down)
protected void handleDownMsg(QTreeDownMsg msg)
protected void handleDownMsgAck(QTreeDownMsgAck msg)
public void init(ConfigDataIF config) throws Exception
init
in interface EventHandlerIF
init
in class StandardStage
Exception
public int profileSize()
profileSize
in interface ProfilableIF
protected Set getParents(SecureHash treeId)
protected Set getChildren(SecureHash treeId)
public Set getRevpointers(Map revs, int level)
Router
. Not implemented in Tapas.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |