|
Query Cycle Simulator HEADER | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--qcsim.content.impl.PeerContentImpl
Represents the total content of a given peer.
| Constructor Summary | |
PeerContentImpl(PeerContentManager manager,
java.util.ArrayList contentCategories)
Constructor: Sets up supported content categories of peer. |
|
| Method Summary | |
int |
categories()
The number of content categories this peer contains. |
Content |
category(int category)
Get the content category |
java.lang.Object |
clone()
Create a copy of this peer content |
java.util.Iterator |
iterator()
Iterator for all content categories owned by this peer. |
PeerContentManager |
manager()
The manager of this PeerContent object. |
int |
randomCategory()
Choose a random category to download from |
int |
randomFile(int category)
Choose a random file to download. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PeerContentImpl(PeerContentManager manager,
java.util.ArrayList contentCategories)
manager - The content managercontentCategories - A list of Content categories this peer owns.| Method Detail |
public java.lang.Object clone()
clone in class java.lang.Objectpublic PeerContentManager manager()
manager in interface PeerContentpublic int categories()
categories in interface PeerContentpublic java.util.Iterator iterator()
iterator in interface PeerContentpublic Content category(int category)
category in interface PeerContentpublic int randomCategory()
randomCategory in interface PeerContentpublic int randomFile(int category)
randomFile in interface PeerContentcategory - choose file from this content category
|
Query Cycle Simulator HEADER | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||