java.lang.Object
com.ibm.jvm.trace.format.api.TraceRecord
- All Implemented Interfaces:
Comparable<TraceRecord>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTraceRecord(TraceContext context, byte[] data) This will create a TraceRecord from a byte array.TraceRecord(TraceContext context, RandomAccessFile file, long offset) -
Method Summary
Modifier and TypeMethodDescriptionintappendToStream(ByteStream stream, boolean newThread) Appends the body of the data from this trace record to the stream IN CHRONOLOGICAL ORDER.intcompareTo(TraceRecord other) Compares this object with the specified object for order.summary()
-
Field Details
-
TRACERECORD_HEADER_SIZE
public static final int TRACERECORD_HEADER_SIZE- See Also:
-
-
Constructor Details
-
TraceRecord
This will create a TraceRecord from a byte array. The byte array must be of the correct length for a trace record in this context.- Parameters:
context-data-- Throws:
IllegalArgumentException
-
TraceRecord
public TraceRecord(TraceContext context, RandomAccessFile file, long offset) throws IOException, IllegalArgumentException - Throws:
IOExceptionIllegalArgumentException
-
-
Method Details
-
appendToStream
Appends the body of the data from this trace record to the stream IN CHRONOLOGICAL ORDER. This means that if the buffer wrapped at all the data will be reordered so that reading from the bytestream will return data correctly ordered for reading as a continuous temporal stream.- Parameters:
stream- - the stream onto which the record should be appendednewThread- - indicates whether this is the first record on a thread- Returns:
- the number of bytes appended
-
summary
-
compareTo
Description copied from interface:java.lang.ComparableCompares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.The implementor must ensure
signum(x.compareTo(y)) == -signum(y.compareTo(x))for allxandy. (This implies thatx.compareTo(y)must throw an exception if and only ify.compareTo(x)throws an exception.)The implementor must also ensure that the relation is transitive:
(x.compareTo(y) > 0 && y.compareTo(z) > 0)impliesx.compareTo(z) > 0.Finally, the implementor must ensure that
x.compareTo(y)==0implies thatsignum(x.compareTo(z)) == signum(y.compareTo(z)), for allz.- Specified by:
compareToin interfaceComparable<TraceRecord>- Parameters:
other- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-