org.javagroups.protocols
Class PerfHeader
java.lang.Object
|
+--org.javagroups.Header
|
+--org.javagroups.protocols.PerfHeader
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Externalizable, java.io.Serializable
- public class PerfHeader
- extends Header
Inserted by PERF into each message. Records the time taken by each protocol to process the message to
which this header is attached. Travels down through the stack and up the other stack with the message.
- Author:
- Bela Ban
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PerfHeader
public PerfHeader()
PerfHeader
public PerfHeader(java.lang.Object sender,
java.lang.Object receiver)
toString
public java.lang.String toString()
- Overrides:
toString
in class Header
printContents
public java.lang.String printContents(boolean detailed)
printContents
public java.lang.String printContents(boolean detailed,
java.util.Vector prots)
setEndTime
public void setEndTime()
setReceived
public void setReceived(java.lang.String prot_name,
int type)
setDone
public void setDone(java.lang.String prot_name,
int type)
setNetworkSent
public void setNetworkSent()
setNetworkReceived
public void setNetworkReceived()
addEntry
public void addEntry(java.lang.String prot_name)
- Adds a new entry to both hashtables
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
size
public long size()
- Description copied from class:
Header
- To be implemented by subclasses. Return the size of this object for the serialized version of it.
I.e. how many bytes this object takes when flattened into a buffer. This may be different for each instance,
or can be the same. This may also just be an estimation. E.g. FRAG uses it on Message to determine whether
or not to fragment the message. Fragmentation itself will be accurate, because the entire message will actually
be serialized into a byte buffer, so we can determine the exact size.
- Overrides:
size
in class Header
main
public static void main(java.lang.String[] args)
Copyright ? 2001,2002 www.javagroups.com . All Rights Reserved.