|
ANTS v2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ants.core.Capsule | +--apps.statsfusion.StatsReturnCapsule
Stats return capsule.
Field Summary | |
java.util.Vector |
branches
|
int |
cachetime
The number of seconds to wait in the NodeCache before expiring |
long |
capTime
|
ByteArray |
data
|
int |
dpt
Capsule headers which only occur in the main capsule |
java.util.Vector |
fusedcapsules
All capsules fused with this one |
int |
infosource
Capsule headers and statistics returns |
long |
keyid
|
long |
latency
|
int |
nodessentto
|
int |
numstatsstrings
|
int |
parentnode
|
boolean |
partial
|
long |
removekey
An arbitrary number used to single out this capsule from other return capsules in a node cache |
int |
rootaddress
|
ByteArray |
statsstrings
|
Fields inherited from class ants.core.Capsule |
MAX_TTL |
Constructor Summary | |
StatsReturnCapsule()
|
|
StatsReturnCapsule(int d)
|
|
StatsReturnCapsule(long keyid,
int rootaddress)
Constructor used when StatsReturnCapsule is sitting in the node cache |
|
StatsReturnCapsule(short sa,
short da,
int na,
Node n)
|
Method Summary | |
Xdr |
decode()
Decode a capsule header from this Capsule's xdr field. |
Xdr |
encode()
Return capsule data looks like: 4 Address of the actual source of the information 4 Address of the node that requested stats from source node 8 Time capsule this is a response to was sent 8 Latency (0 if latency has yet to be figured) 8 The key id of this capsule (used in the node cache) 4 Number of nodes the source of this return sent to 4 Cachetime parameter n The addresses of the nodes the request was sent to n The byte array containing the return data |
boolean |
equals(java.lang.Object o)
Used when a StatsReturnCapsule is held in a NodeCache |
boolean |
evaluate(Node n)
The forwarding routine for the Capsule. |
void |
fuse(StatsReturnCapsule src)
Fuses the information from src into this capsule |
int |
hashCode()
Used when a StatsReturnCapsule is held in a NodeCache |
int |
length()
Return the length of the capsule header that all capsule encodings will include. |
void |
setData(ByteArray ba)
|
void |
showInformation(StatsReturnCapsule hsrc,
Node n)
Print out the information that is contained in this capsule |
void |
subdecode(Xdr xdr)
Subencode is called on each fused capsule and the parent capsule to decode only the capsules data. |
void |
subencode(Xdr xdr)
Subencode is called on each fused capsule and the parent capsule to encode only its own data |
int |
sublength()
Sublength is called on each fused capsule and the parent capsule to get the length of just that capsule |
Methods inherited from class ants.core.Capsule |
create,
encodeCapsuleForSend,
findExtension,
findMID,
findPID,
getDst,
getPrevious,
getSrc,
getTTL,
prime,
setDst,
toString |
Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public int infosource
public int parentnode
public long capTime
public long latency
public long keyid
public int nodessentto
public java.util.Vector branches
public int dpt
public int rootaddress
public ByteArray data
public boolean partial
public int numstatsstrings
public ByteArray statsstrings
public int cachetime
public long removekey
public java.util.Vector fusedcapsules
Constructor Detail |
public StatsReturnCapsule()
public StatsReturnCapsule(int d)
public StatsReturnCapsule(long keyid, int rootaddress)
This sets only the information neccessary to compare this capsule to those sitting in the node cache.
public StatsReturnCapsule(short sa, short da, int na, Node n)
Method Detail |
public int length()
public int sublength()
public Xdr encode()
The data in the capsule contains strings which specify the actual statistics of the node this is returning from
The header for an entire return capsule looks like:
4 The number of fused capules
4 The destination application port
4 The address of the root of this tree
1 The partial flag (indicates that more returns might come from
this source
4 The number of stats strings in each return capsule
n The return stats header strings
#xdr
public void subencode(Xdr xdr)
public Xdr decode()
public void subdecode(Xdr xdr)
public boolean evaluate(Node n)
This method should not access other Java classes, and should only interact with the local system through the local node interface. This routine should "terminate quickly."
XXX perhaps default to forwarding the Capsule?
node
- the local node interfacepublic void showInformation(StatsReturnCapsule hsrc, Node n)
public void fuse(StatsReturnCapsule src)
Note that this only holds on to a reference to the capsule to be fused until this capsule is actually sent
src
- - The capsule to fuse with this onepublic void setData(ByteArray ba)
public boolean equals(java.lang.Object o)
public int hashCode()
|
ANTS v2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |