|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrice.p2p.scribe.ScribeImpl.TopicManager
public class ScribeImpl.TopicManager
Class which keeps track of a given topic
| Field Summary | |
|---|---|
protected ArrayList<NodeHandle> |
children
DESCRIBE THE FIELD |
protected ArrayList<ScribeMultiClient> |
clients
DESCRIBE THE FIELD |
protected NodeHandle |
parent
DESCRIBE THE FIELD |
protected 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. |
Collection<NodeHandle> |
getChildren()
Gets the Children attribute of the TopicManager object |
Collection<ScribeMultiClient> |
getClients()
Gets the Clients attribute of the TopicManager object |
NodeHandle |
getParent()
Gets the Parent attribute of the TopicManager object |
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,
List<Id> pathToRoot)
Sets the Parent attribute of the TopicManager object |
void |
setPathToRoot(List<Id> pathToRoot)
Sets the PathToRoot attribute of the TopicManager object Don't hold the topicManagers lock, this method sends messages |
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 List<Id> pathToRoot
protected ArrayList<ScribeMultiClient> clients
protected ArrayList<NodeHandle> children
protected NodeHandle parent
| Method Detail |
|---|
public Topic getTopic()
public NodeHandle getParent()
public Collection<ScribeMultiClient> getClients()
public boolean containsClient(ScribeMultiClient client)
client - The client in question
public Collection<NodeHandle> getChildren()
public int numChildren()
public List<Id> getPathToRoot()
public void setPathToRoot(List<Id> pathToRoot)
pathToRoot - The new PathToRoot value
public void setParent(NodeHandle handle,
List<Id> pathToRoot)
handle - The new Parent valuepublic String toString()
toString in class Objectpublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||