|
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.ScribeImpl.TopicManager
public class ScribeImpl.TopicManager
Class which keeps track of a given topic
Field Summary | |
---|---|
protected java.util.ArrayList<NodeHandle> |
children
DESCRIBE THE FIELD |
protected java.util.ArrayList<ScribeMultiClient> |
clients
DESCRIBE THE FIELD |
protected NodeHandle |
parent
DESCRIBE THE FIELD |
protected java.util.List<Id> |
pathToRoot
The current path to the root for this node |
protected Topic |
topic
DESCRIBE THE FIELD |
Method Summary | |
---|---|
void |
addChild(NodeHandle child)
Adds a feature to the Child attribute of the TopicManager object Need to be holding lock: topicManagers |
void |
addClient(ScribeMultiClient client)
Adds a feature to the Client attribute of the TopicManager object |
boolean |
containsChild(NodeHandle child)
|
boolean |
containsClient(ScribeMultiClient client)
Returns whether or not this topic manager contains the given client. |
java.util.Collection<NodeHandle> |
getChildren()
Gets the Children attribute of the TopicManager object |
java.util.Collection<ScribeMultiClient> |
getClients()
Gets the Clients attribute of the TopicManager object |
NodeHandle |
getParent()
Gets the Parent attribute of the TopicManager object |
java.util.List<Id> |
getPathToRoot()
Gets the PathToRoot attribute of the TopicManager object |
Topic |
getTopic()
Gets the topic of the TopicManager object |
int |
numChildren()
|
boolean |
removeChild(NodeHandle child)
Removes the child from the topic. |
boolean |
removeClient(ScribeMultiClient client)
|
void |
setParent(NodeHandle handle,
java.util.List<Id> pathToRoot)
Sets the Parent attribute of the TopicManager object |
void |
setPathToRoot(java.util.List<Id> pathToRoot)
Sets the PathToRoot attribute of the TopicManager object Don't hold the topicManagers lock, this method sends messages |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Topic topic
protected java.util.List<Id> pathToRoot
protected java.util.ArrayList<ScribeMultiClient> clients
protected java.util.ArrayList<NodeHandle> children
protected NodeHandle parent
Method Detail |
---|
public Topic getTopic()
public NodeHandle getParent()
public java.util.Collection<ScribeMultiClient> getClients()
public boolean containsClient(ScribeMultiClient client)
client
- The client in question
public java.util.Collection<NodeHandle> getChildren()
public int numChildren()
public java.util.List<Id> getPathToRoot()
public void setPathToRoot(java.util.List<Id> pathToRoot)
pathToRoot
- The new PathToRoot valuepublic void setParent(NodeHandle handle, java.util.List<Id> pathToRoot)
handle
- The new Parent valuepublic java.lang.String toString()
toString
in class java.lang.Object
public void addClient(ScribeMultiClient client)
client
- The feature to be added to the Client attributepublic boolean removeClient(ScribeMultiClient client)
client
- the client to remove
public boolean containsChild(NodeHandle child)
public void addChild(NodeHandle child)
child
- The feature to be added to the Child attributepublic boolean removeChild(NodeHandle child)
child
- the child to be removed
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |