All Packages This Package Class Hierarchy Class Search Index
Class edu.utah.janos.antsr.apps.stats.StatsCapsule
java.lang.Object
|
+----edu.utah.janos.antsr.core.Capsule
|
+----edu.utah.janos.antsr.apps.stats.StatsCapsule
public class StatsCapsule
extends edu.utah.janos.antsr.core.Capsule
{
// Fields 9
private static final byte[] MID;
private static final byte[] PID;
public Vector branches;
private static final int cachetime;
public byte depth;
public short dpt;
public long keyid;
public long now;
public int rootaddress;
// Constructors 2
public StatsCapsule();
public StatsCapsule(int);
// Methods 8
private int branch(Node);
public Xdr decode();
public Xdr encode();
private ByteArray encodeNodeInfo(Node);
public boolean evaluate(Node);
public int length();
protected byte[] mid();
protected byte[] pid();
}
Stats request capsule.
- Author:
-
Janos Ministry of Development
private static final byte[] MID
private static final byte[] PID
public int rootaddress
public long keyid
public short dpt
public byte depth
public long now
private static final int cachetime
public Vector branches
public StatsCapsule()
public StatsCapsule(int d)
protected byte[] mid()
- Overrides:
- mid in class Capsule
protected byte[] pid()
- Overrides:
- pid in class Capsule
public int length()
- Overrides:
- length in class Capsule
public Xdr encode()
Stats request capsules look like:
4 Address of the root of the tree
4 Unique key id of this request tree
2 Application port
1 Depth
4 Time capsule was sent
- Overrides:
- encode in class Capsule
public Xdr decode()
- Overrides:
- decode in class Capsule
private int branch(Node n)
Does the actual process of branching the request packet
out to all neighboring nodes except those the have already
been visited.
Uses soft-state to persistantly keep track of which nodes
have already been visited and to keep from sending back to
root or the source of this request capsule
- Returns:
- The number of requests branched out
private ByteArray encodeNodeInfo(Node n)
Encode information about this node to be returned to the root
of the stats
To change the statistics returned by the tree, change this function
public boolean evaluate(Node n)
- Overrides:
- evaluate in class Capsule
All Packages This Package Class Hierarchy Class Search Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7