|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmain.MapComponent
main.Node
medisyn.X2XProxy
public class X2XProxy
Represents one proxy which can be used in scenarios and experiments
| Field Summary | |
|---|---|
private java.lang.String |
hostName
|
private int[] |
ipIntArr
|
private boolean |
isLeader
|
private int |
nrOfFiles
|
private ProxyGroup |
proxyGroup
|
private java.util.Hashtable<java.lang.Integer,VideoFile> |
videoFiles
|
private java.util.Hashtable<java.lang.Integer,VideoFile> |
videoFiles2
|
| Fields inherited from class main.Node |
|---|
defaultColor, sizeSmall, SLICE_NODE_PREFIX |
| Constructor Summary | |
|---|---|
X2XProxy()
construct a new X2XProxy |
|
X2XProxy(Node n)
construct a new X2XProxy with the values of a Node |
|
| Method Summary | |
|---|---|
double |
calcAbsCategoryFreq(FileCategory cat)
calculates the absolute frequency of files of the FileCategory cat on this proxy TODO: change this according to formula in X2X-paper (playbackTime) |
double |
calcCategoryFreq(FileCategory cat)
calculates the relative frequency of files of the FileCategory cat on this proxy TODO: change this according to formula in X2X-paper (playbackTime) |
X2XProxy |
clone()
clones the object |
X2XProxy |
clone2()
clones the object without the videoFiles2 |
int |
compareTo(X2XProxy other)
Compares this instance of X2XProxy with the specified
instance. |
boolean |
equals(Node other)
is other Node equal to this one? |
boolean |
equals(java.lang.Object other)
is other Object equal to this one? |
boolean |
equals(X2XProxy other)
is other X2XProxy equal to this one? |
FileCategory |
getBestCat(java.util.Vector<FileCategory> fileCategories)
find out the best semantic category for this proxy |
java.lang.String |
getHostName()
|
int[] |
getIpIntArr()
|
int |
getNrOfFiles()
|
ProxyGroup |
getProxyGroup()
|
java.util.Hashtable<java.lang.Integer,VideoFile> |
getVideoFiles()
|
java.util.Hashtable<java.lang.Integer,VideoFile> |
getVideoFiles2()
|
boolean |
isLeader()
|
void |
setHostName(java.lang.String hostName)
sets the hostname of this X2XProxy and of the parent object (Node) |
void |
setIpIntArr(int[] ip)
|
void |
setLeader(boolean isLeader)
|
void |
setNrOfFiles(int nrOfFiles)
|
void |
setProxyGroup(ProxyGroup proxyGroup)
|
void |
setVideoFiles(java.util.Hashtable<java.lang.Integer,VideoFile> videoFiles)
|
void |
setVideoFiles2(java.util.Hashtable<java.lang.Integer,VideoFile> videoFiles2)
|
java.lang.String |
toString()
return String-representation of object |
void |
updateNodeData(Node n)
update the data of this proxy according to the given node |
| Methods inherited from class main.Node |
|---|
copyValuesToNode, getCity, getColor, getCountry, getHostname, getId, getIp, getPosition, getRegion, getSize, isSliceNode, setCity, setColor, setCountry, setHostname, setId, setIp, setPosition, setRegion, setSize, setSliceNode |
| Methods inherited from class main.MapComponent |
|---|
getWeightColor, getWeightSize, setWeightColor, setWeightSize |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int[] ipIntArr
private java.lang.String hostName
private int nrOfFiles
private java.util.Hashtable<java.lang.Integer,VideoFile> videoFiles
private java.util.Hashtable<java.lang.Integer,VideoFile> videoFiles2
private ProxyGroup proxyGroup
private boolean isLeader
| Constructor Detail |
|---|
public X2XProxy()
public X2XProxy(Node n)
n - - the node to take the values from| Method Detail |
|---|
public int[] getIpIntArr()
public void setIpIntArr(int[] ip)
ip - - the ipIntArr to setpublic int getNrOfFiles()
public void setNrOfFiles(int nrOfFiles)
nrOfFiles - the nrOfFiles to setpublic java.lang.String toString()
toString in class NodeNodepublic void updateNodeData(Node n)
n - - Node to take the data frompublic double calcCategoryFreq(FileCategory cat)
public FileCategory getBestCat(java.util.Vector<FileCategory> fileCategories)
throws java.lang.Exception
java.lang.Exceptionpublic double calcAbsCategoryFreq(FileCategory cat)
public X2XProxy clone()
throws java.lang.CloneNotSupportedException
clone in class Nodejava.lang.CloneNotSupportedException
public X2XProxy clone2()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedExceptionpublic boolean equals(X2XProxy other)
X2XProxy equal to this one?
other -
public boolean equals(java.lang.Object other)
Object equal to this one?
equals in class Nodeother -
public boolean equals(Node other)
Node equal to this one?
other -
public int compareTo(X2XProxy other)
X2XProxy with the specified
instance. Returns a negative integer if this instance comes first in a
natural ordering, a positive integer if the specified instance comes
first in a natural ordering, or zero if they're equal.
Note that comparison is done only by comparing the two hostnames.
TODO: Additionaly get the positions of the two instances and compare region, state and city --> nice sorting possible
compareTo in interface java.lang.Comparable<X2XProxy>other - another instance of X2XProxy
public java.lang.String getHostName()
public void setHostName(java.lang.String hostName)
hostName - the hostName to setpublic ProxyGroup getProxyGroup()
public void setProxyGroup(ProxyGroup proxyGroup)
proxyGroup - the proxyGroup 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 boolean isLeader()
public void setLeader(boolean isLeader)
isLeader - the isLeader to setpublic java.util.Hashtable<java.lang.Integer,VideoFile> getVideoFiles2()
public void setVideoFiles2(java.util.Hashtable<java.lang.Integer,VideoFile> videoFiles2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||