|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary | |
boolean |
addChild(NodeHandle child,
NodeId topicId)
Add a node as a child in the children table for a topic. |
boolean |
anycast(NodeId groupId,
MessageAnycast anycastMessage,
Credentials cred)
An application can create sub-classes of MessageAnycast type of messages and write their own handling functions so as to take care of routing of these messages and also to handle cases where the anycast message reaches an intermediate node where there is no application running to take care of it. |
boolean |
anycast(NodeId groupID,
java.io.Serializable obj,
Credentials cred)
Anycast to a group/topic. |
boolean |
create(NodeId groupID,
Credentials cred)
Creates a group/topic if the credentials are valid. |
NodeId |
generateTopicId(java.lang.String topicName)
Generate a unique id for the topic, which will determine its rendezvous point. |
java.util.Vector |
getChildren(NodeId topicId)
This returns the most current view of the children in this topic's multicast subtree rooted at the local node. |
NodeHandle |
getParent(NodeId topicId)
Returns the local node's parent in this topic's multicast tree. |
boolean |
join(NodeId groupID,
IScribeApp subscriber,
Credentials cred)
Joins a multicast group/topic. |
boolean |
join(NodeId groupID,
IScribeApp subscriber,
Credentials cred,
java.io.Serializable obj)
Joins a multicast group/topic. |
boolean |
leave(NodeId groupID,
IScribeApp subscriber,
Credentials cred)
Leaving a multicast group/topic. |
boolean |
multicast(NodeId groupID,
java.io.Serializable obj,
Credentials cred)
Multicast information to a group/topic. |
int |
numChildren(NodeId topicId)
This returns the number of children in this topic's multicast subtree rooted at the local node. |
void |
registerApp(IScribeApp app)
Registers the IScribeApp to the Scribe substrate. |
void |
registerScribeObserver(IScribeObserver app)
Registers the application that implements the IScribeObserver interface. |
boolean |
removeChild(NodeHandle child,
NodeId topicId)
Removes a node as a child from the children table for a topic. |
void |
scheduleHB()
Sends heartbeat messages to this local node's children for all the topics on this local scribe node. |
boolean |
setParent(NodeHandle parent,
NodeId topicId)
Sets the parent for the topic specified by topicId. |
void |
setTreeRepairThreshold(int value)
The tree repair event for a particular topic in Scribe is triggered when a node misses a certain treeRepairThreshold number of heartbeat messages from its parent for the topic. |
Method Detail |
public void registerApp(IScribeApp app)
public void registerScribeObserver(IScribeObserver app)
app
- The application interested in getting notified whenever
a topic is implicitly created.public boolean create(NodeId groupID, Credentials cred)
cred
- The credentials of the entity creating the groupgroupID
- The ID of the group to be created
public boolean join(NodeId groupID, IScribeApp subscriber, Credentials cred)
cred
- The credentials of the entity joining the groupgroupID
- The ID of the group to join tosubscriber
- The application joining the group
public boolean join(NodeId groupID, IScribeApp subscriber, Credentials cred, java.io.Serializable obj)
cred
- The credentials of the entity joining the groupgroupID
- The ID of the group to join tosubscriber
- The application joining the groupobj
- Additional data to be passed with the SUBSCRIBE msg, specific to
an application. Should be serializable.
public boolean leave(NodeId groupID, IScribeApp subscriber, Credentials cred)
cred
- The credentials of the entity leaving the groupgroupID
- The ID of the group to leavesubscriber
- The application leaving the group. Use null if
not directly called by an application.
public boolean multicast(NodeId groupID, java.io.Serializable obj, Credentials cred)
cred
- The credentials of the entity multicasting to the groupgroupID
- The ID of the group to multicast.obj
- The information that is to be multicast.
This should be serializable.
public boolean anycast(NodeId groupID, java.io.Serializable obj, Credentials cred)
groupID
- The ID of the group to anycast.obj
- The information that is to be included in anycast message.
This should be serializable.cred
- The credentials of the entity anycasting to the group.
public boolean anycast(NodeId groupId, MessageAnycast anycastMessage, Credentials cred)
anycastMessage
- The anycast message created by application specific to its needs,
can decide how the message is going to be routed in the anycast
tree, how the message is going to be handled and so on.cred
- The credentials of the entity anycasting to the group.
public void scheduleHB()
public void setTreeRepairThreshold(int value)
value
- The value for the treeRepairThreshold.public NodeId generateTopicId(java.lang.String topicName)
topicName
- The name of the topic (unique to the local node)
public NodeHandle getParent(NodeId topicId)
topicId
- The id of the topic.
public boolean setParent(NodeHandle parent, NodeId topicId)
parent
- The new parent for the topictopicId
- the topic for which this parent is set
public java.util.Vector getChildren(NodeId topicId)
topicId
- The id of the topic.
public int numChildren(NodeId topicId)
topicId
- The id of the topic.
public boolean addChild(NodeHandle child, NodeId topicId)
child
- the child to be addedtopicId
- the topic for which this child is added
public boolean removeChild(NodeHandle child, NodeId topicId)
child
- the child to be removedtopicId
- the topic for which this child is removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |