- java.lang.Object
-
- com.ibm.jvm.trace.format.api.TraceRecord
-
- All Implemented Interfaces:
Comparable<TraceRecord>
public class TraceRecord extends Object implements Comparable<TraceRecord>
-
-
Field Summary
Fields Modifier and Type Field Description static int
TRACERECORD_HEADER_SIZE
-
Constructor Summary
Constructors Constructor Description TraceRecord(TraceContext context, byte[] data)
This will create a TraceRecord from a byte array.TraceRecord(TraceContext context, RandomAccessFile file, long offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
appendToStream(ByteStream stream, boolean newThread)
Appends the body of the data from this trace record to the stream IN CHRONOLOGICAL ORDER.String
summary()
-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
TRACERECORD_HEADER_SIZE
public static final int TRACERECORD_HEADER_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TraceRecord
public TraceRecord(TraceContext context, byte[] data) throws IllegalArgumentException
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:
data
-context
-- Throws:
IllegalArgumentException
-
TraceRecord
public TraceRecord(TraceContext context, RandomAccessFile file, long offset) throws IOException, IllegalArgumentException
- Throws:
IOException
IllegalArgumentException
-
-
Method Detail
-
appendToStream
public int appendToStream(ByteStream stream, boolean newThread)
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
public String summary()
-
-