|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmedisyn.ProxyGenerator
public class ProxyGenerator
Manages the proxies, enables assignment of file categories to proxies, and forms proxy groups based on semantic closeness.
Field Summary | |
---|---|
private java.util.Vector<FileCategory> |
fileCategories
|
private java.util.Vector<X2XProxy> |
proxies
|
private java.util.Vector<ProxyGroup> |
proxyGroups
|
private java.util.Vector<Request> |
requests
|
private java.util.Hashtable<java.lang.Integer,VideoFile> |
videoFiles
|
Constructor Summary | |
---|---|
ProxyGenerator()
Initialize the ProxyGenerator with default values |
Method Summary | |
---|---|
private boolean |
assignAllProxyCategories()
Assigns semantic Filecategories to all files of all proxies prequisites: this.videoFiles and this.requests and this.proxies must be set before |
private void |
assignCategoriesToProxyfiles(X2XProxy proxy)
Assigns semantic Filecategories to all files of 1 proxy prequisites: this.videoFiles and this.requests and this.proxies must be set before |
private void |
assignFileCategories()
as medisyn does not retain the info about file-categories: assign a RANDOM category to each file prequisites: this.videoFiles and this.fileCategories must be set before |
private void |
formGroups(boolean equalNrOfProxiesPerGroup)
Iterates through proxies and forms groups NOTE: this only works here locally if only semantical closeness is considered! else: -->code must be moved to PlabServers prequisites: this.videoFiles and this.proxies and this.fileCategories must be set before |
java.util.Vector<X2XProxy> |
generateProxies(boolean equalNrOfProxiesPerGroup)
generate the proxies according to the requests and videoFiles, calculate the Proxy-Groups prequisites: this.videoFiles and this.requests and this.proxies must be set before |
java.util.Vector<FileCategory> |
getFileCategories()
|
java.util.Vector<X2XProxy> |
getProxies()
|
java.util.Vector<ProxyGroup> |
getProxyGroups()
|
java.util.Vector<Request> |
getRequests()
|
java.util.Hashtable<java.lang.Integer,VideoFile> |
getVideoFiles()
|
static void |
printProxyGroups(ProxyGroup proxyGroup)
prints the proxy-grup and its proxies to stdout |
static void |
printProxyGroups(java.util.Vector<ProxyGroup> proxyGroups)
prints the proxy-grups and their proxies to stdout |
void |
setFileCategories(java.util.Vector<FileCategory> fileCategories)
|
void |
setProxies(java.util.Vector<X2XProxy> proxies)
|
void |
setRequests(java.util.Vector<Request> requests)
|
void |
setVideoFiles(java.util.Hashtable<java.lang.Integer,VideoFile> videoFiles)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Vector<X2XProxy> proxies
private java.util.Vector<Request> requests
private java.util.Hashtable<java.lang.Integer,VideoFile> videoFiles
private java.util.Vector<ProxyGroup> proxyGroups
private java.util.Vector<FileCategory> fileCategories
Constructor Detail |
---|
public ProxyGenerator()
Method Detail |
---|
private void assignFileCategories() throws java.lang.Exception
java.lang.Exception
private void formGroups(boolean equalNrOfProxiesPerGroup) throws java.lang.Exception
equalNrOfProxiesPerGroup
- - if true, then this function will try to form groups with equal nr of nodes in each group,
otherwise, the nodes will be assigned to groups straight ahead.
java.lang.Exception
public static void printProxyGroups(java.util.Vector<ProxyGroup> proxyGroups) throws java.lang.Exception
proxyGroups
- - Vector containing the groups and proxies
java.lang.Exception
public static void printProxyGroups(ProxyGroup proxyGroup) throws java.lang.Exception
proxyGroup
- - the group and its proxies
java.lang.Exception
private boolean assignAllProxyCategories() throws java.lang.Exception
java.lang.Exception
private void assignCategoriesToProxyfiles(X2XProxy proxy) throws java.lang.Exception, java.lang.CloneNotSupportedException
proxy
-
java.lang.Exception
java.lang.Exception
java.lang.CloneNotSupportedException
public java.util.Vector<X2XProxy> generateProxies(boolean equalNrOfProxiesPerGroup) throws java.lang.Exception
equalNrOfProxiesPerGroup
- - if true, then formGroups()
will try to form groups with equal nr of nodes in each group,
otherwise, the nodes will be assigned to groups straight ahead.
java.lang.Exception
public java.util.Vector<Request> getRequests()
public void setRequests(java.util.Vector<Request> requests)
requests
- the requests to setpublic java.util.Hashtable<java.lang.Integer,VideoFile> getVideoFiles()
public void setVideoFiles(java.util.Hashtable<java.lang.Integer,VideoFile> videoFiles)
videoFiles
- the videoFiles to setpublic java.util.Vector<X2XProxy> getProxies()
public java.util.Vector<ProxyGroup> getProxyGroups()
public void setProxies(java.util.Vector<X2XProxy> proxies)
proxies
- the proxies to setpublic java.util.Vector<FileCategory> getFileCategories()
public void setFileCategories(java.util.Vector<FileCategory> fileCategories)
fileCategories
- the fileCategories to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |