|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Scribe
Method Summary | |
---|---|
void |
addChild(Topic topic,
NodeHandle child)
Adds a child to the given topic |
void |
anycast(Topic topic,
RawScribeContent content)
|
void |
anycast(Topic topic,
RawScribeContent content,
NodeHandle hint)
|
void |
anycast(Topic topic,
ScribeContent content)
Anycasts the given content to a member of the given topic |
void |
anycast(Topic topic,
ScribeContent content,
NodeHandle hint)
Anycasts the given content to a member of the given topic The hint helps us to implement centralized algorithms where the hint is the cachedRoot for the topic. |
boolean |
containsChild(Topic myTopic,
NodeHandle child)
|
boolean |
containsTopic(Topic myTopic)
Returns true if there is a TopicManager object corresponding to this topic |
void |
destroy()
|
NodeHandle[] |
getChildren(Topic topic)
Returns the list of children for a given topic |
ScribeContentDeserializer |
getContentDeserializer()
|
Environment |
getEnvironment()
|
NodeHandle |
getParent(Topic myTopic)
Returns the parent node for a given topic |
ScribePolicy |
getPolicy()
Returns the current policy for this scribe object |
Topic[] |
getTopics(ScribeClient client)
Returns the list of topics the given client is subscribed to. |
boolean |
isRoot(Topic topic)
Returns whether or not this Scribe is the root for the given topic |
int |
numChildren(Topic topic)
|
void |
publish(Topic topic,
RawScribeContent content)
|
void |
publish(Topic topic,
ScribeContent content)
Publishes the given message to the topic. |
void |
removeChild(Topic topic,
NodeHandle child)
Removes a child from the given topic |
void |
setContentDeserializer(ScribeContentDeserializer deserializer)
|
void |
setPolicy(ScribePolicy policy)
Sets the current policy for this scribe object |
void |
subscribe(Topic topic,
ScribeClient client)
Subscribes the given client to the provided topic. |
void |
subscribe(Topic topic,
ScribeClient client,
RawScribeContent content)
|
void |
subscribe(Topic topic,
ScribeClient client,
RawScribeContent content,
NodeHandle hint)
|
void |
subscribe(Topic topic,
ScribeClient client,
ScribeContent content)
Subscribes the given client to the provided topic. |
void |
subscribe(Topic topic,
ScribeClient client,
ScribeContent content,
NodeHandle hint)
Subscribes the given client to the provided topic. |
Topic[] |
topicsAsChild(NodeHandle child)
This returns the topics for which the parameter 'child' is a Scribe tree child of the local node |
Topic[] |
topicsAsParent(NodeHandle parent)
This returns the topics for which the parameter 'parent' is a Scribe tree parent of the local node |
void |
unsubscribe(Topic topic,
ScribeClient client)
Unsubscribes the given client from the provided topic. |
Method Detail |
---|
void subscribe(Topic topic, ScribeClient client)
topic
- The topic to subscribe toclient
- The client to give messages tovoid subscribe(Topic topic, ScribeClient client, ScribeContent content)
topic
- The topic to subscribe toclient
- The client to give messages tocontent
- The content to include in the subscribevoid subscribe(Topic topic, ScribeClient client, RawScribeContent content)
void subscribe(Topic topic, ScribeClient client, ScribeContent content, NodeHandle hint)
topic
- The topic to subscribe toclient
- The client to give messages tocontent
- The content to include in the subscribehint
- The first hop of the message ( Helpful to implement a centralized solution)void subscribe(Topic topic, ScribeClient client, RawScribeContent content, NodeHandle hint)
void unsubscribe(Topic topic, ScribeClient client)
topic
- The topic to unsubscribe fromclient
- The client to unsubscribevoid addChild(Topic topic, NodeHandle child)
topic
- The topic to add the child tochild
- The child to addvoid removeChild(Topic topic, NodeHandle child)
topic
- The topic to remove the child fromchild
- The child to removevoid publish(Topic topic, ScribeContent content)
topic
- The topic to publish tocontent
- The content to publishvoid publish(Topic topic, RawScribeContent content)
void anycast(Topic topic, ScribeContent content)
topic
- The topic to anycast tocontent
- The content to anycastvoid anycast(Topic topic, RawScribeContent content)
void anycast(Topic topic, ScribeContent content, NodeHandle hint)
topic
- The topic to anycast tocontent
- The content to anycasthint
- the first hop of the Anycastvoid anycast(Topic topic, RawScribeContent content, NodeHandle hint)
boolean isRoot(Topic topic)
topic
- The topic in question
NodeHandle[] getChildren(Topic topic)
topic
- The topic to return the children of
NodeHandle getParent(Topic myTopic)
myTopic
- The topic to return the parent of
Topic[] getTopics(ScribeClient client)
client
- The client in question
Topic[] topicsAsParent(NodeHandle parent)
Topic[] topicsAsChild(NodeHandle child)
int numChildren(Topic topic)
boolean containsTopic(Topic myTopic)
boolean containsChild(Topic myTopic, NodeHandle child)
ScribePolicy getPolicy()
void setPolicy(ScribePolicy policy)
policy
- The current policy for this scribeEnvironment getEnvironment()
void destroy()
destroy
in interface Destructable
void setContentDeserializer(ScribeContentDeserializer deserializer)
ScribeContentDeserializer getContentDeserializer()
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |